Skip to content

Commit da99187

Browse files
committed
VER: Release C++ client 0.53.0
1 parent d8fda10 commit da99187

4 files changed

Lines changed: 40 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 0.53.0 - TBD
3+
## 0.53.0 - 2026-04-07
44

55
### Enhancements
66
- Added `TryNextRecord` and `FillBuffer` to `LiveBlocking` for more fine-grained

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24..4.2)
66

77
project(
88
databento
9-
VERSION 0.52.0
9+
VERSION 0.53.0
1010
LANGUAGES CXX
1111
DESCRIPTION "Official Databento client library"
1212
)

pkg/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maintainer: Databento <support@databento.com>
22
_pkgname=databento-cpp
33
pkgname=databento-cpp-git
4-
pkgver=0.52.0
4+
pkgver=0.53.0
55
pkgrel=1
66
pkgdesc="Official C++ client for Databento"
77
arch=('any')

tests/src/live_blocking_tests.cpp

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,9 @@ TEST_F(LiveBlockingTests, TestNextRecordTimeout) {
340340
std::mutex receive_mutex;
341341
std::condition_variable receive_cv;
342342
const mock::MockLsgServer mock_server{
343-
dataset::kXnasItch, kTsOut, [&](mock::MockLsgServer& self) {
343+
dataset::kXnasItch, kTsOut,
344+
[kRec, &sent_first_msg, &send_mutex, &send_cv, &received_first_msg,
345+
&receive_mutex, &receive_cv](mock::MockLsgServer& self) {
344346
self.Accept();
345347
self.Authenticate();
346348
self.SendRecord(kRec);
@@ -397,7 +399,9 @@ TEST_F(LiveBlockingTests, TestNextRecordTimeoutWithZstdCompression) {
397399
std::mutex receive_mutex;
398400
std::condition_variable receive_cv;
399401
const mock::MockLsgServer mock_server{
400-
dataset::kXnasItch, kTsOut, Compression::Zstd, [&](mock::MockLsgServer& self) {
402+
dataset::kXnasItch, kTsOut, Compression::Zstd,
403+
[kRec, &sent_first_msg, &send_mutex, &send_cv, &received_first_msg,
404+
&receive_mutex, &receive_cv](mock::MockLsgServer& self) {
401405
self.Accept();
402406
self.Authenticate();
403407
self.StartCompressed();
@@ -789,14 +793,23 @@ TEST_F(LiveBlockingTests, TestTryNextRecordEmptyBuffer) {
789793
TEST_F(LiveBlockingTests, TestTryNextRecordAfterFillBuffer) {
790794
constexpr auto kTsOut = false;
791795
constexpr OhlcvMsg kRec{DummyHeader<OhlcvMsg>(RType::Ohlcv1M), 1, 2, 3, 4, 5};
792-
bool sent = false;
796+
bool client_ready{};
797+
std::mutex client_ready_mutex;
798+
std::condition_variable client_ready_cv;
799+
bool sent{};
793800
std::mutex sent_mutex;
794801
std::condition_variable sent_cv;
795802
const mock::MockLsgServer mock_server{
796803
dataset::kXnasItch, kTsOut,
797-
[kRec, &sent, &sent_mutex, &sent_cv](mock::MockLsgServer& self) {
804+
[kRec, &client_ready, &client_ready_mutex, &client_ready_cv, &sent, &sent_mutex,
805+
&sent_cv](mock::MockLsgServer& self) {
798806
self.Accept();
799807
self.Authenticate();
808+
{
809+
// wait for client to finish auth to prevent TCP coalescing
810+
std::unique_lock<std::mutex> lock{client_ready_mutex};
811+
client_ready_cv.wait(lock, [&client_ready] { return client_ready; });
812+
}
800813
self.SendRecord(kRec);
801814
{
802815
const std::lock_guard<std::mutex> lock{sent_mutex};
@@ -809,6 +822,11 @@ TEST_F(LiveBlockingTests, TestTryNextRecordAfterFillBuffer) {
809822
.SetSendTsOut(kTsOut)
810823
.SetAddress(kLocalhost, mock_server.Port())
811824
.BuildBlocking();
825+
{
826+
const std::lock_guard<std::mutex> lock{client_ready_mutex};
827+
client_ready = true;
828+
client_ready_cv.notify_one();
829+
}
812830
{
813831
std::unique_lock<std::mutex> lock{sent_mutex};
814832
sent_cv.wait(lock, [&sent] { return sent; });
@@ -889,15 +907,23 @@ TEST_F(LiveBlockingTests, TestTryNextRecordPartialRecord) {
889907
TimeDeltaNanos{},
890908
100};
891909

910+
bool client_ready{};
911+
std::mutex client_ready_mutex;
912+
std::condition_variable client_ready_cv;
892913
bool send_remaining{};
893914
std::mutex send_remaining_mutex;
894915
std::condition_variable send_remaining_cv;
895916
const mock::MockLsgServer mock_server{
896917
dataset::kGlbxMdp3, kTsOut,
897-
[kRec, &send_remaining, &send_remaining_mutex,
898-
&send_remaining_cv](mock::MockLsgServer& self) {
918+
[kRec, &client_ready, &client_ready_mutex, &client_ready_cv, &send_remaining,
919+
&send_remaining_mutex, &send_remaining_cv](mock::MockLsgServer& self) {
899920
self.Accept();
900921
self.Authenticate();
922+
{
923+
// wait for client to finish auth to prevent TCP coalescing
924+
std::unique_lock<std::mutex> lock{client_ready_mutex};
925+
client_ready_cv.wait(lock, [&client_ready] { return client_ready; });
926+
}
901927
self.SplitSendRecord(kRec, send_remaining, send_remaining_mutex,
902928
send_remaining_cv);
903929
}};
@@ -906,6 +932,11 @@ TEST_F(LiveBlockingTests, TestTryNextRecordPartialRecord) {
906932
.SetSendTsOut(kTsOut)
907933
.SetAddress(kLocalhost, mock_server.Port())
908934
.BuildBlocking();
935+
{
936+
const std::lock_guard<std::mutex> lock{client_ready_mutex};
937+
client_ready = true;
938+
client_ready_cv.notify_one();
939+
}
909940
// Read partial record (just header)
910941
auto fill_res = target.FillBuffer(std::chrono::milliseconds{1000});
911942
ASSERT_EQ(fill_res.status, IReadable::Status::Ok);

0 commit comments

Comments
 (0)