Skip to content

Releases: questdb/c-questdb-client

4.0.3

12 Jul 15:06
d328c5d
Compare
Choose a tag to compare

What's Changed

In this release, we have addressed a significant issue related to a version conflict with rustls library, which was causing compilation errors in Rust projects using our client. Here are the detailed changes:

  • ureq library pinned to 2.9. This is a workaround for algesten/ureq#765
  • Enforce request timeout greater than zero. #74

Full Changelog: 4.0.2...4.0.3

4.0.2

09 May 09:35
0a42f25
Compare
Choose a tag to compare

What's Changed

  • bug: HTTP timeout wasn't applied to the TCP connection phase

Full Changelog: 4.0.1...4.0.2

4.0.1

26 Apr 09:43
414eccd
Compare
Choose a tag to compare

What's Changed

  • Significant improvement in the Rustdoc documentation
  • ilp-over-http is now a default feature flag, improving the quick start experience

Full Changelog: 4.0.0...4.0.1

4.0.0

18 Mar 15:00
8fb6aa2
Compare
Choose a tag to compare

Features

This release introduces a number of changes, including major new features and a few breaking changes in the Rust, C and C++ APIs.

Introduction of ILP over HTTP Support

The library now supports InfluxDB Line Protocol (ILP) over HTTP in addition to the existing TCP protocol.

  • ILP/HTTP allows for better error feedback and control over transactions and is the recommended for both existing and new users.
  • ILP/HTTP introduces basic (username/password) and token (bearer) authentication.
// C++
auto sender = questdb::ingress::sender::from_conf("http::addr=localhost:9000;token=auth_token;");

Configuration via String or Environment Variable

Users can now configure the client by passing a configuration string or via an environment variable (QDB_CLIENT_CONF). This provides a more flexible and convenient way to configure the client. This new approach is being adopted for all our client libraries.

// Rust
let sender = Sender::from_conf("tcp::addr=localhost:9009;")?

The builder/opts APIs remain available.

Transaction Support

The library introduces transactional flushes for ILP over HTTP, allowing users to ensure that all rows in a flush request refer to the same table, treating the request as a single transaction. This feature is allows for use cases where ingestion atomicity is required.

Reliability Enhancements

The ILP over HTTP implementation includes features like configurable request timeouts, retry mechanisms, and minimum expected throughput settings to improve the performance and reliability of data transmission.

Buffer Row Count

You can ask the buffer how many rows it has recorded by calling its .row_count() method.

Breaking Changes

.connect() renamed to .build()

When using the builder/opts API, the connect method has been renamed to build.

This is because when connecting via HTTP, the connection to the database is made lazily at the first flush.

TCP Auth API Changes

The ILP/TCP .auth(username, token, token_x, token_y) method which took for parameters has been expanded to four different settings.

From conf:

// Rust
let sender = Sender::from_conf("tcps::addr=localhost:9009;username=u;token=t;token_x=x;token_y=y;");

Programmatically:

// Rust
let sender = SenderBuilder::new(Protocol::Tcps, "localhost", 9009)
    .username("u")?
    .token("t")?
    .token_x("x")?
    .token_y("y")?
    .build()?;

TLS configuration parameters

The .tls(...) API has been removed and replaced with:

  • tls_ca which takes an enum (webpki, os, webpki+os, pem_file)
  • tls_roots replaces the old tls_ca API.
  • tls_verify(false) replaces the older insecure_skip_verify API.

net_interface -> bind_interface

The TCP-only setting for binding the outbound network interface has been renamed to bind_interface.
This feature is no longer available when using HTTP. Raise an issue if this is something you require.

Full changelog: 3.1.0...4.0.0

3.1.0

23 Nov 09:15
ced64a9
Compare
Choose a tag to compare

What's Changed

This release adds support for reading TLS CA root certificates from the host operating system.
The default remains to use the root certificates provided by the webpki-roots Rust crate.
The TLS negotiation is still performed by using the rustls Rust crate, and not using OpenSSL or other OS-specific TLS APIs.

This new feature is particularly valuable when using QuestDB Enterprise in corporate environments where the set of trusted root CA certificates is custom to the organisation and deployed to each OS's root CA certificate store.

To enable this feature:

If programming in Rust:

SenderBuilder::new(...)
    .tls(Tls::Enabled(CertificateAuthority::OsRoots))

If programming in C:

line_sender_opts* opts = ...;
line_sender_opts_tls_os_roots(opts);

If programming in C++:

questdb::ingress::opts opts{...};
opts.tls_os_roots(opts);

Full Changelog: 3.0.0...3.1.0

3.0.0

22 Sep 16:20
fa10c59
Compare
Choose a tag to compare

What's Changed

The new release 3.0 brings a number of minor improvements and some (small) breaking API changes.

  • Fixed a bug where timestamp columns could not accept values before Jan 1st 1970 UTC.
  • TCP connections now use SO_KEEPALIVE. This should ensure that connections don't drop after a period of inactivity.
  • Upgraded dependencies to newer library versions. This also includes the latest webpki-roots crate.
  • Disabled compiling tests and examples in the default built from CMake (C and C++) reducing the amount of code that gets built when using the questdb client as a dependency: These are now hidden behind an option. Should improve compile times.
  • Disabled code generation of additional tests in the default build. This should fix some reported built time issues and improve compile times.
  • Updated to the newer version of the CMake corrosion library to compile the Rust code from CMake.
  • Fixed a Windows build linker issue. This was introduced as the dependencies were not pinned.
  • Pinned the dependencies so builds are more reproducible, avoiding issues like the aforementioned linker error.
  • General code cleanup in Rust with fmt and clippy.
  • System tests now use the latest QuestDB version: 7.3.2.
  • Updated documentation to emphasize good practices.
  • Improvements in timestamp handling.
  • In Rust, optional support for chrono::DateTime via the chrono_timestamp feature.
  • New APIs to get the current timestamp as micros or nanos in Rust, C and C++.

Breaking Changes

Here are the changes that may require some minor code changes.
This release does not change the minimum supported QuestDB server version.

Rust

  • The .at(..) and .column_ts(..) methods now can take either TimestampNanos or TimestampMicros timestamps, depending on what is most convenient. It should be noted that - as of writing - QuestDB stores (regardless) all timestamps as micros. This statement holds true also for the designated timestamp.
  • In earlier versions, the .at(..) and .column_ts(..) methods also accepted std::time::SystemTime. This is no longer the case, as it cause confusion on the precision that was being used for the conversion.
  • To compensate, both TimestampNanos and TimestampMicros types support new conversion "constructor" methods that take std::time::SystemTime or chrono::DateTime (if the chrono_timestamp feature is enabled).

C

  • The include has been renamed from #include <questdb/ilp/line_sender.h> to #include <questdb/ingress/line_sender.h>.
  • The line_sender_buffer_column_ts and line_sender_buffer_at functions are now removed. Replacements:
    • line_sender_buffer_column_ts_micros (equivalent to old function) and line_sender_buffer_column_ts_nanos.
    • line_sender_buffer_at_nanos (equivalent to old function) and line_sender_buffer_at_micros.
  • You can get the current system time via the new line_sender_now_micros and line_sender_now_nanos functions.

C++

  • The include has been renamed from #include <questdb/ilp/line_sender.hpp> to #include <questdb/ingress/line_sender.hpp>.
  • The new namespace is questdb::ingress instead of questdb::ilp.
  • The .column() and .at() methods can now accept both timestamp_nanos and timestamp_micros
  • These same methods no longer accept std::chrono::time_point, but you can still pass in a time_point by first creating a timestamp_nanos or timestamp_micros object from it first.
  • You can get the current system time via the new timestamp_micros::now() and timestamp_nanos::now() static "constructor" functions.

Full Changelog: 2.1.3...3.0.0

2.1.3

04 Jan 12:02
ad3776e
Compare
Choose a tag to compare

What's Changed

  • Faster string serialization escaping logic.
  • Fixed name validation length error code from InvalidApi to InvalidName.

Full Changelog: 2.1.2...2.1.3

2.1.2

09 Nov 16:33
f32af37
Compare
Choose a tag to compare

What's Changed

C++ API improvements:

  • Fixed some potential linker errors due to missing inline keywords in the C++ header file.
  • Removed memory allocation from questdb::ilp::line_sender_buffer's constructor: This is now performed lazily. This makes it easier to use the type with concurrent queues that set a buffer by reference.

2.1.1

26 Oct 15:49
2cd4e7f
Compare
Choose a tag to compare

What's Changed

This is a minor release and only brings a small bugfix:

  • Setting SO_REUSEADDR on outbound socket. This is helpful to users with large number of connections who previously ran out of outbound network ports.

2.1.0

05 Aug 15:13
473c21e
Compare
Choose a tag to compare

What's Changed

This is a minor release and brings a few new features:

  • For the first time, we expose the Rust API which forms the foundation of this library:
  • The buffer API now supports setting a marker and rolling back to it in case of an error.
    See set_marker, rewind_to_marker, clear_marker functions/methods.
  • Revised docs, broken down by language.