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

Core, Spark3.5: Fix tests failure due to timeout #11654

Merged
merged 1 commit into from
Dec 17, 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
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
*/
package org.apache.iceberg.hadoop;

import static org.apache.iceberg.CatalogProperties.LOCK_ACQUIRE_TIMEOUT_MS;
import static org.apache.iceberg.TableProperties.COMMIT_MAX_RETRY_WAIT_MS;
import static org.apache.iceberg.TableProperties.COMMIT_MIN_RETRY_WAIT_MS;
import static org.apache.iceberg.TableProperties.COMMIT_NUM_RETRIES;
import static org.apache.iceberg.types.Types.NestedField.optional;
import static org.apache.iceberg.types.Types.NestedField.required;
Expand Down Expand Up @@ -421,7 +424,16 @@ public void testConcurrentFastAppends(@TempDir File dir) throws Exception {
TABLES.create(
SCHEMA,
SPEC,
ImmutableMap.of(COMMIT_NUM_RETRIES, String.valueOf(threadsCount)),
ImmutableMap.of(
COMMIT_NUM_RETRIES,
String.valueOf(threadsCount),
COMMIT_MIN_RETRY_WAIT_MS,
"10",
manuzhang marked this conversation as resolved.
Show resolved Hide resolved
COMMIT_MAX_RETRY_WAIT_MS,
"1000",
// Disable extra retry on lock acquire failure since commit will fail anyway.
LOCK_ACQUIRE_TIMEOUT_MS,
manuzhang marked this conversation as resolved.
Show resolved Hide resolved
"0"),
dir.toURI().toString());

String fileName = UUID.randomUUID().toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import static org.apache.iceberg.DataOperations.DELETE;
import static org.apache.iceberg.RowLevelOperationMode.COPY_ON_WRITE;
import static org.apache.iceberg.SnapshotSummary.ADD_POS_DELETE_FILES_PROP;
import static org.apache.iceberg.TableProperties.COMMIT_MAX_RETRY_WAIT_MS;
import static org.apache.iceberg.TableProperties.COMMIT_MIN_RETRY_WAIT_MS;
import static org.apache.iceberg.TableProperties.DELETE_DISTRIBUTION_MODE;
import static org.apache.iceberg.TableProperties.DELETE_ISOLATION_LEVEL;
import static org.apache.iceberg.TableProperties.DELETE_MODE;
Expand Down Expand Up @@ -1142,8 +1144,14 @@ public synchronized void testDeleteWithSnapshotIsolation()
createOrReplaceView("deleted_id", Collections.singletonList(1), Encoders.INT());

sql(
"ALTER TABLE %s SET TBLPROPERTIES('%s' '%s')",
tableName, DELETE_ISOLATION_LEVEL, "snapshot");
"ALTER TABLE %s SET TBLPROPERTIES('%s'='%s', '%s'='%s', '%s'='%s')",
tableName,
DELETE_ISOLATION_LEVEL,
"snapshot",
COMMIT_MIN_RETRY_WAIT_MS,
"10",
COMMIT_MAX_RETRY_WAIT_MS,
"1000");

sql("INSERT INTO TABLE %s VALUES (1, 'hr')", tableName);
createBranchIfNeeded();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
package org.apache.iceberg.spark.extensions;

import static org.apache.iceberg.RowLevelOperationMode.COPY_ON_WRITE;
import static org.apache.iceberg.TableProperties.COMMIT_MAX_RETRY_WAIT_MS;
import static org.apache.iceberg.TableProperties.COMMIT_MIN_RETRY_WAIT_MS;
import static org.apache.iceberg.TableProperties.MERGE_DISTRIBUTION_MODE;
import static org.apache.iceberg.TableProperties.MERGE_ISOLATION_LEVEL;
import static org.apache.iceberg.TableProperties.MERGE_MODE;
Expand Down Expand Up @@ -1609,8 +1611,14 @@ public synchronized void testMergeWithSnapshotIsolation()
createOrReplaceView("source", Collections.singletonList(1), Encoders.INT());

sql(
"ALTER TABLE %s SET TBLPROPERTIES('%s' '%s')",
tableName, MERGE_ISOLATION_LEVEL, "snapshot");
"ALTER TABLE %s SET TBLPROPERTIES('%s'='%s', '%s'='%s', '%s'='%s')",
tableName,
MERGE_ISOLATION_LEVEL,
"snapshot",
COMMIT_MIN_RETRY_WAIT_MS,
"10",
COMMIT_MAX_RETRY_WAIT_MS,
"1000");

sql("INSERT INTO TABLE %s VALUES (1, 'hr')", tableName);
createBranchIfNeeded();
Expand Down