Commit 96108c4
authored
feat: meta-service: add
* feat: meta-service: add `proposed_at` tracking the time when a key is written
Add `proposed_at_ms` field to `KvMeta` protobuf to track proposal
timestamps for key-value operations in the meta service.
Introduce `ReduceSeqV` trait with two methods: `erase_proposed_at()`
removes timestamps from metadata for test comparisons, and `reduce()`
removes default-valued metadata to minimize storage overhead.
Implement the trait for common types including `SeqV<T>`,
`Option<SeqV<T>>`, collection types, and domain-specific types
(`Change`, `pb::Event`, `pb::StreamItem`). Update all meta service
tests to use `erase_proposed_at()` when comparing results, allowing
tests to ignore variable proposal timestamps while verifying data
correctness. Add comprehensive unit tests covering metadata erasure
and reduction behavior.
* refactor: update tests for KVMeta proposed_at_ms field
Fixed compilation errors and test assertions after adding proposed_at_ms
to KVMeta structure. Updated tests to handle the new field:
- Updated KVMeta::new() calls to include proposed_at_ms parameter
- Applied .erase_proposed_at() for SeqV types in assertions
- Updated expected values to match database default (Some(0))
- Replaced legacy KVMeta::new_expires_at() calls
- Updated JSON serialization test expectations
All 94 raft-store tests now passing.
* refactor: rename ReduceSeqV to NormalizeMeta with improved docs
* M src/meta/service/tests/it/grpc/metasrv_grpc_kv_read_v1.rs
* M tests/metactl/want_exported_v004
* M src/meta/client/src/lib.rs
* M tests/metactl/subcommands/cmd_export_from_grpc.pyproposed_at tracking the time when a key is written (#18812)1 parent 271b7d6 commit 96108c4
File tree
34 files changed
+1158
-242
lines changed- src/meta
- client/src
- kvapi-test-suite/src
- raft-store/src
- leveled_store
- immutable_data
- immutable_levels
- sm_v003
- state_machine
- service/tests/it
- grpc
- meta_node
- types
- proto
- src
- cmd
- proto_display
- proto_ext
- watch_ext
- tests
- compat/meta_meta
- metactl
- subcommands
34 files changed
+1158
-242
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
0 commit comments