mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(glue): preserve existing partitions on duplicate creation (#8100)
* fix(glue): preserve existing partitions on duplicate creation Reject CreatePartition for values already stored in the table before mutating partition metadata. Keep the existing BatchCreatePartition error and allow explicit updates through UpdatePartition. Port the independent duplicate check and regression from AndreKurait/floci commit f6905c8ced6c21fd9aeca013beb4ac511e5c1469. Add SDK coverage for single and batch creation, preserved metadata, per-item batch errors, and subsequent explicit updates. Signed-off-by: Andre Kurait <akurait@amazon.com> Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * fix(glue): serialize concurrent partition creation Synchronize single and batch creates so duplicate detection and writes share one service critical section. Cover all four concurrent single/batch combinations, preserving the first metadata and per-item batch errors. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * test(glue): isolate catalog fixtures from Athena readers Share the existing floci-duck resource lock with Athena and Firehose tests. Their catalog setup must not read temporary Glue metadata whose S3 locations are placeholders while the catalog test is running. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> --------- Signed-off-by: Andre Kurait <akurait@amazon.com> Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> Co-authored-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
1 parent
17af8368b5
commit
08d7ca5b4d
4 files changed
+217
-3
No files matched your search
@@ -4,6 +4,7 @@ import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import software.amazon.awssdk.services.glue.GlueClient;
|
||||
import software.amazon.awssdk.services.glue.model.BatchCreatePartitionRequest;
|
||||
import software.amazon.awssdk.services.glue.model.BatchCreatePartitionResponse;
|
||||
@@ -92,6 +93,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
@DisplayName("Glue catalog")
|
||||
@ResourceLock("floci-duck")
|
||||
class GlueCatalogTest {
|
||||
|
||||
private static final String DATABASE_NAME = TestFixtures.uniqueName("catalog_db");
|
||||
|
||||
Reference in new issue
Block a user