[Feature] Recovering WAL records will not add schema to tskv; stores drop_table
& remove_tsfamily
in WAL
#1340
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Required checklist
config
,meta/config
anddefault config
)api change
label.Which issue does this PR close?
Related #1178, but has some differences.
Rationale for this change
WAL changes
kvcore.rs
drop_table
andremove_tsfamily
in WAL files.write
will not create database schemas, and if database&table&tsfamily of a WAL record does not exist in tskv, this WAL record will be ignored.drop_table
orremove_tsfamily
will not do anything, because WALwrite
that schema not existed in tskv was ignored.Here is the newest schema of the record data in WAL file:
Other improves
test_kvcore_interface.rs
sometime report unexpected error:update table conflict
.Option::ok_or_else()
instead ofOption::ok_or()
Result::with_context()
insead ofResult::context()
Are there any user-facing changes?