Skip to content

Commit

Permalink
Merge pull request #534 from Altinity/532-change-index_granularity-to…
Browse files Browse the repository at this point in the history
…-8192

Change index_granularity to 8192 instead of 8198.
  • Loading branch information
subkanthi authored Apr 13, 2024
2 parents ae2a760 + a06a4dd commit 12a3623
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ offset.storage.offset.storage.jdbc.offset.table.ddl: "CREATE TABLE %s
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198"
SETTINGS index_granularity = 8192"
offset.storage.offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: io.debezium.storage.jdbc.history.JdbcSchemaHistory
schema.history.internal.jdbc.url: "jdbc:clickhouse://localhost:8123"
Expand Down
2 changes: 1 addition & 1 deletion sink-connector-lightweight/docker/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s
`record_insert_seq` UInt64,
`_version` UInt64 MATERIALIZED toUnixTimestamp64Nano(now64(9))
)
ENGINE = ReplacingMergeTree(_version) ORDER BY offset_key SETTINGS index_granularity = 8198"
ENGINE = ReplacingMergeTree(_version) ORDER BY offset_key SETTINGS index_granularity = 8192"

# offset.storage.jdbc.offset.table.delete: The DML statement used to delete the database table where connector offsets are to be stored.(Advanced)
offset.storage.jdbc.offset.table.delete: "select * from %s"
Expand Down
2 changes: 1 addition & 1 deletion sink-connector-lightweight/docker/config_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s
`record_insert_seq` UInt64,
`_version` UInt64 MATERIALIZED toUnixTimestamp64Nano(now64(9))
)
ENGINE = ReplacingMergeTree(_version) ORDER BY offset_key SETTINGS index_granularity = 8198"
ENGINE = ReplacingMergeTree(_version) ORDER BY offset_key SETTINGS index_granularity = 8192"

# offset.storage.jdbc.offset.table.delete: The DML statement used to delete the database table where connector offsets are to be stored.(Advanced)
offset.storage.jdbc.offset.table.delete: "select * from %s"
Expand Down
2 changes: 1 addition & 1 deletion sink-connector-lightweight/docker/config_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198"
SETTINGS index_granularity = 8192"
offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: "io.debezium.storage.jdbc.history.JdbcSchemaHistory"
schema.history.internal.jdbc.url: "jdbc:clickhouse://clickhouse:8123/altinity_sink_connector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ data:
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198"
SETTINGS index_granularity = 8192"
offset.storage.offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: "io.debezium.storage.jdbc.history.JdbcSchemaHistory"
schema.history.internal.jdbc.url: "jdbc:clickhouse://clickhouse:8123/altinity_sink_connector"
Expand Down Expand Up @@ -92,7 +92,7 @@ data:
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198"
SETTINGS index_granularity = 8192"
offset.storage.offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: "io.debezium.storage.jdbc.history.JdbcSchemaHistory"
schema.history.internal.jdbc.url: "jdbc:clickhouse://chi-argocd-demo-0-0:8123/altinity_sink_connector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ offset.storage.jdbc.offset.table.ddl: "CREATE TABLE %s
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198"
SETTINGS index_granularity = 8192"
offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: io.debezium.storage.jdbc.history.JdbcSchemaHistory
schema.history.internal.jdbc.url: "jdbc:clickhouse://clickhouse:8123"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ offset.storage.offset.storage.jdbc.offset.table.ddl: "CREATE TABLE %s
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198"
SETTINGS index_granularity = 8192"
offset.storage.offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: io.debezium.storage.jdbc.history.JdbcSchemaHistory
schema.history.internal.jdbc.url: "jdbc:clickhouse://clickhouse:8123"
Expand Down
2 changes: 1 addition & 1 deletion sink-connector-lightweight/src/test/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ offset.storage.jdbc.offset.table.name: "altinity_sink_connector.replica_source_i
offset.storage.jdbc.url: "jdbc:clickhouse://clickhouse:8123"
offset.storage.jdbc.user: "ch_user"
offset.storage.jdbc.password: "password"
offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s (`id` String, `offset_key` String, `offset_val` String, `record_insert_ts` DateTime, `record_insert_seq` UInt64, `_version` UInt64 MATERIALIZED toUnixTimestamp64Nano(now64(9))) ENGINE=ReplacingMergeTree(_version) ORDER BY id SETTINGS index_granularity = 8198"
offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s (`id` String, `offset_key` String, `offset_val` String, `record_insert_ts` DateTime, `record_insert_seq` UInt64, `_version` UInt64 MATERIALIZED toUnixTimestamp64Nano(now64(9))) ENGINE=ReplacingMergeTree(_version) ORDER BY id SETTINGS index_granularity = 8192"
offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: "io.debezium.storage.jdbc.history.JdbcSchemaHistory"
schema.history.internal.jdbc.url: "jdbc:clickhouse://clickhouse:8123"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ offset.storage.jdbc.offset.table.name: "altinity_sink_connector.replica_source_i
offset.storage.jdbc.url: "jdbc:clickhouse://clickhouse:8123"
offset.storage.jdbc.user: "ch_user"
offset.storage.jdbc.password: "password"
offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s (`id` String, `offset_key` String, `offset_val` String, `record_insert_ts` DateTime, `record_insert_seq` UInt64, `_version` UInt64 MATERIALIZED toUnixTimestamp64Nano(now64(9))) ENGINE=ReplacingMergeTree(_version) ORDER BY id SETTINGS index_granularity = 8198"
offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s (`id` String, `offset_key` String, `offset_val` String, `record_insert_ts` DateTime, `record_insert_seq` UInt64, `_version` UInt64 MATERIALIZED toUnixTimestamp64Nano(now64(9))) ENGINE=ReplacingMergeTree(_version) ORDER BY id SETTINGS index_granularity = 8192"
offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: "io.debezium.storage.jdbc.history.JdbcSchemaHistory"
schema.history.internal.jdbc.url: "jdbc:clickhouse://clickhouse:8123"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ CREATE TABLE altinity_sink_connector.replica_source_info
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198;
SETTINGS index_granularity = 8192;

INSERT INTO altinity_sink_connector.replica_source_info (id,offset_key,offset_val,record_insert_ts,record_insert_seq) VALUES
('1e34dce5-f61c-4fe7-ba83-0a6805a6ea8e','["altinity_sink_connector",{"server":"embeddedconnector"}]','{"transaction_id":null,"ts_sec":1687277615,"file":"mysql-bin.000003","pos":1144937,"gtids":"4ada0375-0f7e-11ee-afd1-0242c0a85003:1-2418","row":1,"server_id":189,"event":2}','2023-06-20 16:13:35',3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CREATE TABLE altinity_sink_connector.replica_source_info
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198;
SETTINGS index_granularity = 8192;

USE employees;
CREATE TABLE employees.dt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CREATE TABLE altinity_sink_connector.replica_source_info
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198;
SETTINGS index_granularity = 8192;

USE employees;
CREATE TABLE employees.dt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CREATE TABLE altinity_sink_connector.replica_source_info
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198;
SETTINGS index_granularity = 8192;

USE employees;
CREATE TABLE employees.dt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CREATE TABLE altinity_sink_connector.replica_source_info
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198;
SETTINGS index_granularity = 8192;

USE employees;
CREATE TABLE employees.dt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ offset.storage.jdbc.offset.table.ddl: "CREATE TABLE if not exists %s
)
ENGINE = ReplacingMergeTree(_version)
ORDER BY id
SETTINGS index_granularity = 8198"
SETTINGS index_granularity = 8192"
offset.storage.jdbc.offset.table.delete: "delete from %s where 1=1"
schema.history.internal: "io.debezium.storage.jdbc.history.JdbcSchemaHistory"
schema.history.internal.jdbc.url: "jdbc:clickhouse://clickhouse:8123/altinity_sink_connector"
Expand Down

0 comments on commit 12a3623

Please sign in to comment.