mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-14 07:42:28 +00:00
refactor(lsm): finish SSTable and table shard naming
Applies the SSTable / table shard / freeze vocabulary from the previous commit to code that came in from main, and to spots that commit missed: - `get_lsm_stats` test fixtures in Rust and Python still sent the old `buckets` / `generations` keys, so the Rust test target no longer compiled and the Python tests would fail against `table_shards`. - The Java javadoc example called a nonexistent `LsmWriteSpec.tableShard`, an over-rename of `LsmWriteSpec.bucket`; the README used the old `buckets()` / `generations()` accessors. - Prose that still said bucket (for a shard), seal, L0, or flushed generations, and identifier-style "table_shard" / "tableShard" in prose. `LsmWriteSpec::bucket`, `num_buckets`, the hash-bucket values in the merge-insert router, and the `"Sealed"` status wire value are unchanged: those name the sharding transform or a server value, not the shard. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d5544cd5d9
commit
06d7f82fa2
@@ -4908,7 +4908,7 @@ describe("LSM convergence and stats", () => {
|
||||
const conn = await connect(tmpDir.name);
|
||||
const table = await lsmTable(conn);
|
||||
|
||||
// checkpointLsm seals first, so it surfaces flushLsm's rejection.
|
||||
// checkpointLsm freezes first, so it surfaces flushLsm's rejection.
|
||||
await expect(table.checkpointLsm()).rejects.toThrow(/not supported/i);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -467,7 +467,7 @@ export class StandardQueryBase<
|
||||
* {@link Table#setLsmWriteSpec}), reads are routed through the LSM scanner so
|
||||
* they also return data written via the `mergeInsert` LSM path that has not yet
|
||||
* been compacted into the base table (the active/frozen in-memory memtables and
|
||||
* the flushed generations), deduplicated by primary key; a table without a spec
|
||||
* the SSTables), deduplicated by primary key; a table without a spec
|
||||
* reads the base table.
|
||||
*
|
||||
* @param enable - `true` forces the LSM scanner and errors if the table has no
|
||||
|
||||
@@ -815,7 +815,7 @@ export abstract class Table {
|
||||
/**
|
||||
* Freeze every table shard's active memtable into a new SSTable.
|
||||
*
|
||||
* Returns once the seal is committed. Sealing an empty memtable is a no-op,
|
||||
* Returns once the freeze is committed. Freezing an empty memtable is a no-op,
|
||||
* so this is safe to call repeatedly.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@@ -852,9 +852,9 @@ export abstract class Table {
|
||||
*/
|
||||
abstract checkpointLsm(): Promise<void>;
|
||||
/**
|
||||
* Read live per-bucket LSM state.
|
||||
* Read live per-table-shard LSM state.
|
||||
*
|
||||
* Answers "how far behind is my fresh tier", "which bucket is hot", and
|
||||
* Answers "how far behind is my fresh tier", "which table shard is hot", and
|
||||
* "why is my fresh-tier vector search brute-force". Mutates no table state.
|
||||
*
|
||||
* Resolves to `undefined` only when the LSM write path is not enabled.
|
||||
|
||||
+1
-1
@@ -1106,7 +1106,7 @@ impl From<lancedb::table::MemtableStats> for MemtableStats {
|
||||
#[napi(object)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct TableShardStats {
|
||||
/// The shard this table shard writes.
|
||||
/// The id of this table shard.
|
||||
pub shard_id: String,
|
||||
/// `"Active"` or `"Sealed"` (drop-table 2PC in flight).
|
||||
pub status: String,
|
||||
|
||||
Reference in New Issue
Block a user