This is an automated email from the ASF dual-hosted git repository.
jiacai2050 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-horaedb.git
The following commit(s) were added to refs/heads/dev by this push:
new 74c56412 fix: compatible for old table options (#1432)
74c56412 is described below
commit 74c56412b07770f0d58533cdd9192a093ee21ca1
Author: kamille <[email protected]>
AuthorDate: Tue Jan 9 16:59:13 2024 +0800
fix: compatible for old table options (#1432)
## Rationale
Make it compatible for old table options.
## Detailed Changes
When `layered_memtable_opts` not found in `TableOptions`, we disable
`layered_memtable`.
## Test Plan
Test manually.
---
analytic_engine/src/table_options.rs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/analytic_engine/src/table_options.rs
b/analytic_engine/src/table_options.rs
index c33a75db..dfdbd1a2 100644
--- a/analytic_engine/src/table_options.rs
+++ b/analytic_engine/src/table_options.rs
@@ -677,10 +677,14 @@ impl TryFrom<manifest_pb::TableOptions> for TableOptions {
};
let storage_format_hint =
opts.storage_format_hint.context(MissingStorageFormatHint)?;
- let layered_memtable_opts = opts
- .layered_memtable_options
- .context(MissingLayeredMemtableOptions)?
- .into();
+ // For compatible with old `table_options`, `layered_memtable_options`
is
+ // allowed to be `None`, and when found `None`, we disable
`layered_memtable`.
+ let layered_memtable_opts = match opts.layered_memtable_options {
+ Some(v) => v.into(),
+ None => LayeredMemtableOptions {
+ mutable_segment_switch_threshold: ReadableSize(0),
+ },
+ };
let table_opts = Self {
segment_duration,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]