Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DB sources] : Reduce CDC state compression limit to 1MB #35511

Merged
merged 4 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions airbyte-cdk/java/airbyte-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ MavenLocal debugging steps:

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.21.4 | 2024-02-21 | [\#35511](https://github.com/airbytehq/airbyte/pull/35511) | Add Junit progress information to the test logs |
| 0.21.3 | 2024-02-20 | [\#35394](https://github.com/airbytehq/airbyte/pull/35394) | Add Junit progress information to the test logs |
| 0.21.2 | 2024-02-20 | [\#34978](https://github.com/airbytehq/airbyte/pull/34978) | Reduce log noise in NormalizationLogParser. |
| 0.21.1 | 2024-02-20 | [\#35199](https://github.com/airbytehq/airbyte/pull/35199) | Add thread names to the logs. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.21.3
version=0.21.4
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public class AirbyteSchemaHistoryStorage {

private static final Logger LOGGER = LoggerFactory.getLogger(AirbyteSchemaHistoryStorage.class);
private static final long SIZE_LIMIT_TO_COMPRESS_MB = 3;
private static final long SIZE_LIMIT_TO_COMPRESS_MB = 1;
public static final int ONE_MB = 1024 * 1024;
private static final Charset UTF8 = StandardCharsets.UTF_8;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
public class AirbyteSchemaHistoryStorageTest {

@Test
public void testForContentBiggerThan3MBLimit() throws IOException {
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_greater_than_3_mb.dat");
public void testForContentBiggerThan1MBLimit() throws IOException {
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_greater_than_1_mb.dat");

final AirbyteSchemaHistoryStorage schemaHistoryStorageFromUncompressedContent = AirbyteSchemaHistoryStorage.initializeDBHistory(
new SchemaHistory<>(Optional.of(Jsons.jsonNode(contentReadDirectlyFromFile)),
Expand All @@ -46,14 +46,14 @@ public void testForContentBiggerThan3MBLimit() throws IOException {
@Test
public void sizeTest() throws IOException {
assertEquals(5.881045341491699,
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_greater_than_3_mb.dat")));
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_greater_than_1_mb.dat")));
assertEquals(0.0038671493530273438,
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_less_than_3_mb.dat")));
AirbyteSchemaHistoryStorage.calculateSizeOfStringInMB(MoreResources.readResource("dbhistory_less_than_1_mb.dat")));
}

@Test
public void testForContentLessThan3MBLimit() throws IOException {
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_less_than_3_mb.dat");
public void testForContentLessThan1MBLimit() throws IOException {
final String contentReadDirectlyFromFile = MoreResources.readResource("dbhistory_less_than_1_mb.dat");

final AirbyteSchemaHistoryStorage schemaHistoryStorageFromUncompressedContent = AirbyteSchemaHistoryStorage.initializeDBHistory(
new SchemaHistory<>(Optional.of(Jsons.jsonNode(contentReadDirectlyFromFile)),
Expand Down
Loading