Skip to content

RocksDB transaction log operations API#335

Merged
kriszyp merged 7 commits intomainfrom
rocksdb-transaction-log-operations-api2
Apr 14, 2026
Merged

RocksDB transaction log operations API#335
kriszyp merged 7 commits intomainfrom
rocksdb-transaction-log-operations-api2

Conversation

@cb1kenobi
Copy link
Copy Markdown
Contributor

@cb1kenobi cb1kenobi commented Apr 10, 2026

Updated delete_transaction_logs_before and delete_audit_logs_before to share the same logic. Supports both LMDB and RocksDB. The latter has been marked as deprecated.

Updated read_audit_log to support database parameter. schema still supported.

Updated scheduled transaction cleanup to purge RocksDB transaction logs.

Fixes #158, #159, and #166. Fixes CORE-2612.

Recreated from #275

@cb1kenobi cb1kenobi requested a review from a team as a code owner April 10, 2026 22:36
@cb1kenobi cb1kenobi marked this pull request as draft April 10, 2026 22:39
Copy link
Copy Markdown
Member

@kriszyp kriszyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code generally looks good, I noted a potential issue with the expiresAt check, and I know this is waiting on the RocksDB release. And as David noted in the previous PR, it would be great to use the new integration testing API/framework, but definitely wouldn't block merging this, as this is pretty important to get in for functionality parity SRTL.

Comment thread resources/Table.ts Outdated
@cb1kenobi cb1kenobi marked this pull request as ready for review April 14, 2026 19:42
Copy link
Copy Markdown
Member

@kriszyp kriszyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Comment thread resources/Table.ts
logger.trace?.(
`Saving record with id: ${id}, timestamp: ${new Date(txnTime).toISOString()}${
expiresAt ? ', expires at: ' + new Date(expiresAt).toISOString() : ''
expiresAt > 0 ? ', expires at: ' + new Date(expiresAt).toISOString() : ''
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a still a reference to expiresAt requiring greater than zero, although just a log trace.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log trace was the reason I messed with expiresAt at all. A zero/negative value makes no sense being passed into new Date().

@kriszyp kriszyp merged commit f659816 into main Apr 14, 2026
22 checks passed
@kriszyp kriszyp deleted the rocksdb-transaction-log-operations-api2 branch April 14, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

delete_transaction_log_before needs to use RocksDB's purgeLogs

2 participants