Skip to content

Commit 0f69531

Browse files
rustyconoverclaude
andcommitted
Merge branch 'v1.5' into main
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjUJLwV4jh3Za15WU8D8eL
2 parents 63c9abe + 0993f18 commit 0f69531

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎src/httpserver_extension.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ namespace duckdb
632632
loader.RegisterFunction(httpserve_start);
633633
loader.RegisterFunction(httpserve_stop);
634634

635-
QueryFarmSendTelemetry(loader, "httpserver", "2025120401");
635+
QueryFarmSendTelemetry(loader, "httpserver", "2026072501");
636636

637637
// Register the cleanup function to be called at exit
638638
std::atexit(HttpServerCleanup);
@@ -650,7 +650,7 @@ namespace duckdb
650650

651651
std::string HttpserverExtension::Version() const
652652
{
653-
return "2025092401";
653+
return "2026072501";
654654
}
655655

656656
} // namespace duckdb

‎src/query_farm_telemetry.cpp‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "duckdb/main/extension_helper.hpp"
77
#include "duckdb/main/config.hpp"
88
#include <cstdlib>
9-
#include <future>
109
using namespace duckdb_yyjson; // NOLINT
1110

1211
namespace duckdb
@@ -25,6 +24,10 @@ namespace duckdb
2524

2625
auto &http_util = HTTPUtil::Get(*db);
2726
unique_ptr<HTTPParams> params = http_util.InitializeParameters(*db, TARGET_URL);
27+
// Telemetry is best-effort: bound the request so a stalled connection cannot
28+
// keep the detached thread alive. No retries -- a dropped ping is not worth one.
29+
params->timeout = 10;
30+
params->retries = 0;
2831

2932
PostRequestInfo post_request(TARGET_URL, headers, *params, reinterpret_cast<const_data_ptr_t>(json_body),
3033
json_body_size);
@@ -94,10 +97,12 @@ namespace duckdb
9497
yyjson_mut_doc_free(doc);
9598

9699
#ifndef __EMSCRIPTEN__
97-
[[maybe_unused]] auto _ = std::async(
98-
std::launch::async, [db_ptr = loader.GetDatabaseInstance().shared_from_this(), json = telemetry_data,
99-
len = telemetry_len]() mutable
100-
{ sendHTTPRequest(std::move(db_ptr), json, len); });
100+
// Fire-and-forget. Deliberately not std::async: the future it returns has a
101+
// blocking destructor, which would make the caller wait on this HTTP request.
102+
std::thread([db_ptr = loader.GetDatabaseInstance().shared_from_this(), json = telemetry_data,
103+
len = telemetry_len]() mutable
104+
{ sendHTTPRequest(std::move(db_ptr), json, len); })
105+
.detach();
101106
#else
102107
sendHTTPRequest(loader.GetDatabaseInstance().shared_from_this(), telemetry_data, telemetry_len);
103108
#endif

0 commit comments

Comments
 (0)