Skip to content

Commit fdb0e69

Browse files
committed
rust and tidesql reference touch ups
1 parent 7200eff commit fdb0e69

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

src/content/docs/reference/rust.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The easiest way to add TidesDB to your project is via [crates.io](https://crates
4040

4141
```toml
4242
[dependencies]
43-
tidesdb = "0.7"
43+
tidesdb = "0.11"
4444
```
4545

4646
Or using `cargo add`:
@@ -61,26 +61,31 @@ The build script (`build.rs`) handles linking automatically:
6161

6262
### Version Selection
6363

64-
Each crate release defaults to a specific TidesDB C library version. You can select a different version using Cargo features:
64+
Each crate release pins the TidesDB C library version it builds against via a Cargo feature. `tidesdb` 0.11 ships and defaults to **`v9_3_6`** (TidesDB v9.3.6):
6565

6666
```toml
6767
[dependencies]
68-
# Uses the default version (currently v9.2.0)
69-
tidesdb = "0.8"
68+
# Uses the default version (v9.3.6)
69+
tidesdb = "0.11"
70+
```
71+
72+
A version feature maps directly to the TidesDB C library release tag (e.g., `v9_3_6``v9.3.6`). Additional versions are published over time; when more than one is available you can pin a specific one with `default-features = false`:
7073

71-
# Pin to a specific TidesDB version
72-
tidesdb = { version = "0.8", default-features = false, features = ["v9_0_5"] }
74+
```toml
75+
[dependencies]
76+
# Pin to a specific TidesDB version (once that feature is offered)
77+
tidesdb = { version = "0.11", default-features = false, features = ["v9_3_6"] }
7378
```
7479

75-
Only one version feature should be enabled at a time. The version feature (e.g., `v9_2_0`) maps directly to the TidesDB C library release tag (e.g., `v9.2.0`); when multiple are enabled (such as via dependency unification), the highest version is selected.
80+
Only one version feature should be enabled at a time; when several are enabled (e.g. via dependency unification), the highest version is selected.
7681

7782
### Object Store Support
7883

7984
To enable S3 object store support, enable the `objectstore` feature:
8085

8186
```toml
8287
[dependencies]
83-
tidesdb = { version = "0.7", features = ["objectstore"] }
88+
tidesdb = { version = "0.11", features = ["objectstore"] }
8489
```
8590

8691
This requires additional dependencies:
@@ -386,7 +391,7 @@ Between any two single-deletes on the same key, and between the start of the key
386391

387392
This is the right choice for workloads that insert each key exactly once and then delete it exactly once (classic insert-benchmark patterns, secondary-index entries on columns that are never updated, log-style tables with scheduled purges). It is **not** safe for tables that issue repeated updates to the same key. When in doubt, prefer `Transaction::delete`.
388393

389-
Requires tidesdb >= 9.1.0 (the `v9_1_0` Cargo feature, enabled by default in `tidesdb` 0.7).
394+
Requires tidesdb >= 9.1.0; the default `v9_3_6` build satisfies this.
390395

391396
```rust
392397
use tidesdb::{TidesDB, Config, ColumnFamilyConfig};
@@ -768,7 +773,7 @@ fn main() -> tidesdb::Result<()> {
768773
| `compaction_count` | `u64` | Compaction output SSTables produced by this CF |
769774

770775
:::note[Write-amplification counters]
771-
The `wal_bytes_written`, `flush_bytes_written`, `compaction_bytes_written`, `compaction_bytes_read`, `user_bytes_written`, `flush_count`, and `compaction_count` fields require tidesdb >= 9.3.4 (the `v9_3_4` Cargo feature or later, enabled by default). On older libraries they are reported as `0`. This CF's write amplification is `(wal_bytes_written + flush_bytes_written + compaction_bytes_written) / user_bytes_written`. In unified-memtable mode `wal_bytes_written` is `0` here — the shared WAL volume is reported db-wide as `DbStats::uwal_bytes_written`.
776+
The `wal_bytes_written`, `flush_bytes_written`, `compaction_bytes_written`, `compaction_bytes_read`, `user_bytes_written`, `flush_count`, and `compaction_count` fields require tidesdb >= 9.3.4; the default `v9_3_6` build includes them. On older libraries (e.g. an older system library found via pkg-config) they are reported as `0`. This CF's write amplification is `(wal_bytes_written + flush_bytes_written + compaction_bytes_written) / user_bytes_written`. In unified-memtable mode `wal_bytes_written` is `0` here — the shared WAL volume is reported db-wide as `DbStats::uwal_bytes_written`.
772777
:::
773778

774779
### Getting Cache Statistics

src/content/docs/reference/tidesql.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ The primary row CF is different. `UPDATE t SET non_pk_col = ...` writes a fresh
422422
Primary-CF single-delete is therefore behind the session variable `tidesdb_single_delete_primary`, default OFF. Enabling it is the caller's explicit promise that:
423423

424424
- The session performs no `UPDATE` on non-PK columns of TidesDB tables.
425-
- The session performs no `REPLACE INTO` or `INSERT ... ON DUPLICATE KEY UPDATE` that hits the line-5143 silent-overwrite path on a table without secondary indexes.
425+
- The session performs no `REPLACE INTO` or `INSERT ... ON DUPLICATE KEY UPDATE` that hits the silent-overwrite path on a table without secondary indexes.
426426
- New rows with a given PK are always preceded by a `DELETE` of that PK (append-only or insert-then-delete).
427427

428428
Enable it only when the workload is known to fit this shape. Typical safe cases:
@@ -1224,7 +1224,8 @@ SHOW GLOBAL STATUS LIKE 'tidesdb%';
12241224
| Variable | Description |
12251225
|----------|-------------|
12261226
| `Tidesdb_version` | TideSQL plugin version string (e.g. `4.5.5`) |
1227-
| `Tidesdb_version_hex` | TideSQL plugin version as integer (e.g. `263941` = `0x40505`) |
1227+
| `Tidesdb_version_hex` | TideSQL plugin version as integer (e.g. `263429` = `0x40505`) |
1228+
| `Tidesdb_library_version` | Underlying TidesDB storage library (`libtidesdb`) version string |
12281229
| `Tidesdb_column_families` | Number of active column families |
12291230
| `Tidesdb_global_sequence` | Global MVCC sequence number |
12301231
| `Tidesdb_memtable_bytes` | Total memtable memory usage in bytes |
@@ -1391,7 +1392,7 @@ The engine exposes several system variables that control TidesDB's runtime behav
13911392
| `tidesdb_unified_memtable_skip_list_probability` | 0.0 | Skip-list level promotion probability for the unified memtable; 0.0 keeps the library default |
13921393
| `tidesdb_replica_mode` | OFF | Enable read-only replica mode (writes return SQL error) |
13931394
| `tidesdb_replica_sync_interval` | 5000000 | MANIFEST poll interval for replica sync in microseconds |
1394-
| `tidesdb_fast_shutdown` | OFF | When ON, deinit calls `tidesdb_cancel_background_work` before `tidesdb_close` so in-flight compactions bail at their next checkpoint and shutdown returns quickly. Default OFF lets `tidesdb_close` drain naturally, which is the safer setting for object-store and replica deployments where a mid-compaction cancel can leave S3 with referenced-but-not-yet-uploaded SSTables that confuse a syncing replica |
1395+
| `tidesdb_finish_compactions_on_close` | OFF | Maps to `tidesdb_config_t.finish_compactions_on_close`, applied at open. Default OFF (the library default) makes `tidesdb_close` cancel in-flight compactions at their next checkpoint for a fast shutdown; the cancelled merge discards its uncommitted output and leaves inputs intact, so no data is lost and recovery handles a mid-merge state the same way. Set ON to let in-flight compactions run to completion before close returns, which is the safer setting for object-store and replica deployments where a mid-compaction cancel can leave S3 with referenced-but-not-yet-uploaded SSTables that confuse a syncing replica |
13951396

13961397
### Global Variables (dynamic)
13971398

@@ -1750,7 +1751,7 @@ Multi-statement transactions at `REPEATABLE_READ` or higher isolation may fail a
17501751
| 12.3.1 | >= 4.2.6 ||
17511752
| 13.0.2 | >= 4.5.4 ||
17521753

1753-
Current TideSQL release is 4.5.4 (hex `0x40504`).
1754+
Current TideSQL release is 4.5.5 (hex `0x40505`).
17541755

17551756
*As versions are tested and confirmed working we update this table. Full Support means the system is tested against all known functionality.*
17561757

0 commit comments

Comments
 (0)