mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 16:11:48 -05:00
feat(dynamodb): export the changes of a period as an incremental export (#6480)
* feat(dynamodb): export the changes of a period as an incremental export * fix(dynamodb): write characters above U+FFFF in export lines as UTF-8 * feat(dynamodb): refuse incremental export periods over 24 hours * fix(dynamodb): wait for unfinished writes when an incremental export reads items * fix(dynamodb): write no incremental export record when only the order of set members changes
This commit is contained in:
1 parent
9242c7003a
commit
3dc5d356d0
13 files changed
+796
-60
No files matched your search
+19
-1
@@ -207,7 +207,7 @@ class DynamoDbExportTest {
|
||||
.exportType(ExportType.INCREMENTAL_EXPORT)
|
||||
.build()))
|
||||
.isInstanceOf(software.amazon.awssdk.services.dynamodb.model.DynamoDbException.class)
|
||||
.hasMessageContaining("not supported");
|
||||
.hasMessageContaining("Incremental Export Specification expected when export type is set as Incremental Export");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -282,6 +282,24 @@ class DynamoDbExportTest {
|
||||
.anySatisfy(line -> assertThat(line).contains("pk:\"user-3\"", "sk:\"order-003\"", "total:15d1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(11)
|
||||
void exportTableToPointInTime_incrementalUnder15Minutes_throwsInvalidExportTimeException() {
|
||||
Instant created = ddb.describeTable(r -> r.tableName(TABLE_NAME)).table().creationDateTime();
|
||||
|
||||
assertThatThrownBy(() -> ddb.exportTableToPointInTime(ExportTableToPointInTimeRequest.builder()
|
||||
.tableArn(tableArn)
|
||||
.s3Bucket(BUCKET_NAME)
|
||||
.exportType(ExportType.INCREMENTAL_EXPORT)
|
||||
.incrementalExportSpecification(IncrementalExportSpecification.builder()
|
||||
.exportFromTime(created.truncatedTo(ChronoUnit.SECONDS))
|
||||
.exportViewType(ExportViewType.NEW_IMAGE)
|
||||
.build())
|
||||
.build()))
|
||||
.isInstanceOf(InvalidExportTimeException.class)
|
||||
.hasMessageContaining("Difference between export period from time and export period to time is less than 15 minutes");
|
||||
}
|
||||
|
||||
/** The manifests and the data of an export that wrote one data file. */
|
||||
private record ExportFiles(JsonNode manifestSummary, JsonNode dataFileEntry, String data) {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user