Skip to content

describe operations omit last_updated_record on RocksDB (RocksTransactionLogStore.getKeys is a TODO stub) #2091

Description

@kriszyp

Summary

describe_table / describe_database / describe_all silently omit last_updated_record on RocksDB storage — a regression vs LMDB, where the field is populated from the audit store.

Cause

dataLayer/schemaDescribe.ts computes the field from the audit store's newest key:

for (let key of auditStore.getKeys({ reverse: true, limit: 1 })) {
	tableResult.last_updated_record = key[0];
}

but RocksTransactionLogStore.getKeys() is an unimplemented stub:

getKeys(_options?: any) {
	return []; // TODO: implement this
}

and the indices.__updatedtime__ fallback doesn't exist on these tables, so the field is simply never set.

Impact

Implementation notes

There is currently no cheap tail read on the transaction log: rocksdb-js TransactionLog only exposes forward query() (_findPosition is a forward running-maxima index; getStats().lastCommittedPosition is a byte position with no timestamp). A small rocksdb-js API — e.g. getLastEntry() returning the newest committed entry (or just its timestamp) using the already-tracked last-committed position — would let RocksTransactionLogStore.getKeys({ reverse: true, limit: 1 }) be implemented per the existing TODO, restoring the describe field.

Activity

  1. added this to the v5.2 milestone on Aug 5, 2026
  2. added theissue type on Aug 5, 2026
  3. kriszyp commented on Oct 10, 2026

    @kriszyp
    MemberAuthor

    Two related facts from the finding queue (harper main f038807df):

    • getKeys() in resources/RocksTransactionLogStore.ts:646 is still a stub returning []. The clone-readiness half of the original impact is mitigated: cloneNode/syncMonitor.ts:61-69 no longer skips verification when the leader omits last_updated_record. The remaining impact is describe_table / describe_all on RocksDB.
    • The fallback path has a second bug. dataLayer/schemaDescribe.ts:293-296 assigns the whole composite index key ([timestamp, pk]) to last_updated_record, where the audit branch assigns key[0]. Fixing it to key[0] changes the response shape for dynamic tables, so it is worth deciding together with the stub.

    — Claude Opus 5.5 (finding-triage wave 29)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    P2

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions