Skip to content

Commit 2f470fc

Browse files
akashkulkjatinyadav-cc
authored andcommitted
[DB sources] : Reduce CDC state compression limit to 1MB (airbytehq#35511)
1 parent 8f05f84 commit 2f470fc

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

airbyte-cdk/java/airbyte-cdk/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ MavenLocal debugging steps:
166166

167167
| Version | Date | Pull Request | Subject |
168168
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
169+
| 0.21.4 | 2024-02-21 | [\#35511](https://github.com/airbytehq/airbyte/pull/35511) | Add Junit progress information to the test logs |
169170
| 0.21.3 | 2024-02-20 | [\#35394](https://github.com/airbytehq/airbyte/pull/35394) | Add Junit progress information to the test logs |
170171
| 0.21.2 | 2024-02-20 | [\#34978](https://github.com/airbytehq/airbyte/pull/34978) | Reduce log noise in NormalizationLogParser. |
171172
| 0.21.1 | 2024-02-20 | [\#35199](https://github.com/airbytehq/airbyte/pull/35199) | Add thread names to the logs. |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.21.3
1+
version=0.21.4

airbyte-cdk/java/airbyte-cdk/db-sources/src/main/java/io/airbyte/cdk/integrations/debezium/internals/AirbyteSchemaHistoryStorage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
public class AirbyteSchemaHistoryStorage {
4040

4141
private static final Logger LOGGER = LoggerFactory.getLogger(AirbyteSchemaHistoryStorage.class);
42-
private static final long SIZE_LIMIT_TO_COMPRESS_MB = 3;
42+
private static final long SIZE_LIMIT_TO_COMPRESS_MB = 1;
4343
public static final int ONE_MB = 1024 * 1024;
4444
private static final Charset UTF8 = StandardCharsets.UTF_8;
4545

airbyte-cdk/java/airbyte-cdk/db-sources/src/test/java/io/airbyte/cdk/integrations/debezium/internals/AirbyteSchemaHistoryStorageTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
public class AirbyteSchemaHistoryStorageTest {
2020

2121
@Test
22-
public void testForContentBiggerThan3MBLimit() throws IOException {
23-
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_greater_than_3_mb.dat");
22+
public void testForContentBiggerThan1MBLimit() throws IOException {
23+
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_greater_than_1_mb.dat");
2424

2525
final AirbyteSchemaHistoryStorage schemaHistoryStorageFromUncompressedContent = AirbyteSchemaHistoryStorage.initializeDBHistory(
2626
new SchemaHistory<>(Optional.of(Jsons.jsonNode(contentReadDirectlyFromFile)),
@@ -46,14 +46,14 @@ public void testForContentBiggerThan3MBLimit() throws IOException {
4646
@Test
4747
public void sizeTest() throws IOException {
4848
assertEquals(5.881045341491699,
49-
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_greater_than_3_mb.dat")));
49+
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_greater_than_1_mb.dat")));
5050
assertEquals(0.0038671493530273438,
51-
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_less_than_3_mb.dat")));
51+
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_less_than_1_mb.dat")));
5252
}
5353

5454
@Test
55-
public void testForContentLessThan3MBLimit() throws IOException {
56-
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_less_than_3_mb.dat");
55+
public void testForContentLessThan1MBLimit() throws IOException {
56+
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_less_than_1_mb.dat");
5757

5858
final AirbyteSchemaHistoryStorage schemaHistoryStorageFromUncompressedContent = AirbyteSchemaHistoryStorage.initializeDBHistory(
5959
new SchemaHistory<>(Optional.of(Jsons.jsonNode(contentReadDirectlyFromFile)),

0 commit comments

Comments
 (0)