You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (stateStore.streamsEnded.contains(input.key.stream)) {
93
+
throwIllegalStateException(
94
+
"$taskName[$part] received input for complete stream ${input.key.stream}. This indicates data was processed out of order and future bookkeeping might be corrupt. Failing hard."
95
+
)
96
+
}
92
97
// Get or create the accumulator state associated w/ the input key.
Copy file name to clipboardExpand all lines: airbyte-cdk/bulk/toolkits/load-object-storage/src/main/kotlin/io/airbyte/cdk/load/pipline/object_storage/ObjectLoaderFormattedPartPartitioner.kt
Copy file name to clipboardExpand all lines: airbyte-cdk/bulk/toolkits/load-object-storage/src/main/kotlin/io/airbyte/cdk/load/pipline/object_storage/ObjectLoaderLoadedPartPartitioner.kt
Copy file name to clipboardExpand all lines: airbyte-cdk/bulk/toolkits/load-object-storage/src/main/kotlin/io/airbyte/cdk/load/pipline/object_storage/ObjectLoaderPartLoader.kt
Copy file name to clipboardExpand all lines: airbyte-cdk/bulk/toolkits/load-object-storage/src/main/kotlin/io/airbyte/cdk/load/pipline/object_storage/ObjectLoaderPartQueueFactory.kt
Copy file name to clipboardExpand all lines: airbyte-cdk/bulk/toolkits/load-object-storage/src/test/kotlin/io/airbyte/cdk/load/pipeline/object_storage/ObjectLoaderPartQueueTest.kt
+4-4
Original file line number
Diff line number
Diff line change
@@ -34,19 +34,19 @@ class ObjectLoaderPartQueueTest {
34
34
fun`part queue clamps part size if too many workers`() {
35
35
val beanFactory =ObjectLoaderPartQueueFactory(objectLoader)
36
36
every { objectLoader.numPartWorkers } returns 5
37
-
every { objectLoader.numUploadWorkers } returns 3
37
+
every { objectLoader.numUploadWorkers } returns 3// this will be doubled for calcs
38
38
every { objectLoader.partSizeBytes } returns 100
39
39
val memoryReservation = mockk<Reserved<ObjectLoader>>(relaxed =true)
40
40
every { memoryReservation.bytesReserved } returns 800
41
41
val clampedSize = beanFactory.objectLoaderClampedPartSizeBytes(memoryReservation)
42
-
Assertions.assertEquals(800/9, clampedSize)
42
+
Assertions.assertEquals(800/11, clampedSize)
43
43
}
44
44
45
45
@Test
46
46
fun`part queue does not clamp part size if not too many workers`() {
47
47
val beanFactory =ObjectLoaderPartQueueFactory(objectLoader)
48
48
every { objectLoader.numPartWorkers } returns 5
49
-
every { objectLoader.numUploadWorkers } returns 1
49
+
every { objectLoader.numUploadWorkers } returns 1// this will be doubled for calcs
50
50
every { objectLoader.partSizeBytes } returns 100
51
51
val memoryReservation = mockk<Reserved<ObjectLoader>>(relaxed =true)
52
52
every { memoryReservation.bytesReserved } returns 800
@@ -58,7 +58,7 @@ class ObjectLoaderPartQueueTest {
58
58
fun`queue capacity is derived from clamped size and available memory`() {
59
59
val beanFactory =ObjectLoaderPartQueueFactory(objectLoader)
60
60
every { objectLoader.numPartWorkers } returns 3
61
-
every { objectLoader.numUploadWorkers } returns 1
61
+
every { objectLoader.numUploadWorkers } returns 1// this will be doubled for calcs
62
62
val clampedPartSize =150L
63
63
val memoryReservation = mockk<Reserved<ObjectLoader>>(relaxed =true)
64
64
every { memoryReservation.bytesReserved } returns 910
0 commit comments