Skip to content

Commit 244096f

Browse files
committed
fix(options): align core option defaults with Java
1 parent c6bd23f commit 244096f

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

include/paimon/defs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ struct PAIMON_EXPORT Options {
212212
static const char SNAPSHOT_TIME_RETAINED[];
213213

214214
/// "snapshot.expire.limit" - The maximum number of snapshots allowed to expire at a time.
215-
/// Default value is 10.
215+
/// Default value is 50.
216216
static const char SNAPSHOT_EXPIRE_LIMIT[];
217217

218218
/// "snapshot.clean-empty-directories" - Whether to try to clean empty directories when expiring
@@ -391,7 +391,7 @@ struct PAIMON_EXPORT Options {
391391
/// reading the audit_log or binlog system tables. This is only valid for primary key tables.
392392
/// Default value is "false".
393393
static const char TABLE_READ_SEQUENCE_NUMBER_ENABLED[];
394-
/// "key-value.sequence-number.enabled" - Whether to include the _SEQUENCE_NUMBER field when
394+
/// "key-value.sequence_number.enabled" - Whether to include the _SEQUENCE_NUMBER field when
395395
/// reading key-value data. This is an internal option used by AuditLogTable and BinlogTable
396396
/// when table-read.sequence-number.enabled is set to true. Default value is "false".
397397
static const char KEY_VALUE_SEQUENCE_NUMBER_ENABLED[];

src/paimon/common/defs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const char Options::GLOBAL_INDEX_THREAD_NUM[] = "global-index.thread-num";
9898
const char Options::GLOBAL_INDEX_EXTERNAL_PATH[] = "global-index.external-path";
9999
const char Options::AGGREGATION_REMOVE_RECORD_ON_DELETE[] = "aggregation.remove-record-on-delete";
100100
const char Options::TABLE_READ_SEQUENCE_NUMBER_ENABLED[] = "table-read.sequence-number.enabled";
101-
const char Options::KEY_VALUE_SEQUENCE_NUMBER_ENABLED[] = "key-value.sequence-number.enabled";
101+
const char Options::KEY_VALUE_SEQUENCE_NUMBER_ENABLED[] = "key-value.sequence_number.enabled";
102102
const char Options::SCAN_TIMESTAMP_MILLIS[] = "scan.timestamp-millis";
103103
const char Options::SCAN_TIMESTAMP[] = "scan.timestamp";
104104
const char Options::SCAN_TAG_NAME[] = "scan.tag-name";

src/paimon/core/core_options.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,8 @@ struct CoreOptions::Impl {
583583
int32_t snapshot_num_retain_min = 10;
584584
// Parse snapshot.num-retained.max - maximum completed snapshots to retain
585585
int32_t snapshot_num_retain_max = std::numeric_limits<int32_t>::max();
586-
// Parse snapshot.expire.limit - maximum snapshots allowed to expire at a time, default 10
587-
int32_t snapshot_expire_limit = 10;
586+
// Parse snapshot.expire.limit - maximum snapshots allowed to expire at a time, default 50
587+
int32_t snapshot_expire_limit = 50;
588588
// Parse snapshot.time-retained - maximum time of completed snapshots to retain
589589
int64_t snapshot_time_retained = 1 * 3600 * 1000; // 1 hour
590590
PAIMON_RETURN_NOT_OK(
@@ -642,7 +642,7 @@ struct CoreOptions::Impl {
642642
// Parse table-read.sequence-number.enabled - expose sequence number in system tables
643643
PAIMON_RETURN_NOT_OK(parser.Parse<bool>(Options::TABLE_READ_SEQUENCE_NUMBER_ENABLED,
644644
&table_read_sequence_number_enabled));
645-
// Parse key-value.sequence-number.enabled - internal sequence number read switch
645+
// Parse key-value.sequence_number.enabled - internal sequence number read switch
646646
PAIMON_RETURN_NOT_OK(parser.Parse<bool>(Options::KEY_VALUE_SEQUENCE_NUMBER_ENABLED,
647647
&key_value_sequence_number_enabled));
648648
// Parse partial-update.remove-record-on-sequence-group

src/paimon/core/core_options_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ TEST(CoreOptionsTest, TestDefaultValue) {
7171
ExpireConfig expire_config = core_options.GetExpireConfig();
7272
ASSERT_EQ(10, expire_config.GetSnapshotRetainMin());
7373
ASSERT_EQ(std::numeric_limits<int32_t>::max(), expire_config.GetSnapshotRetainMax());
74-
ASSERT_EQ(10, expire_config.GetSnapshotMaxDeletes());
74+
ASSERT_EQ(50, expire_config.GetSnapshotMaxDeletes());
7575
ASSERT_FALSE(expire_config.CleanEmptyDirectories());
7676
ASSERT_EQ(1 * 3600 * 1000L, expire_config.GetSnapshotTimeRetainMs());
7777
ASSERT_EQ(std::vector<std::string>(), core_options.GetSequenceField());

0 commit comments

Comments
 (0)