horaedb
horaedb copied to clipboard
Integration test for compaction offload
Describe This Problem
The subproblem for #1545 . Currently, the compaction offload lacks integration tests. Impl these tests is crucial for ensuring the reliability and correctness of the compaction offload. Secondly, adding support for a manual compact operation in SQL would provide more flexibility to users, allowing them to trigger table compaction on demand.
Proposal
The procedure to test the compaction module (in sql):
- Create a table.
- Insert data into table.
- Flush in-memory data into sst.
- Update data to simulate conditions requiring compaction.
- Flush.
- Trigger compaction. (manual compaction)
- ~~Show compaction status.(optional)~~ (delete for easiness)
- Verify the result.
The problem is that horaedb has not support manual compaction in sqlness yet. I want to impl compact as a pre-command, similar to flush command. The reason is:
-
Consistency with existing command.
flushforces in-memory data to be written to SST files. Similarly,compactcould be triggered to merge and optimize these SST files, aligning the two operations under the same command paradigm.
Additional Context
No response