diff --git a/paimon-python/pypaimon/tests/blob_table_test.py b/paimon-python/pypaimon/tests/blob_table_test.py index 7e4d6c6d26a1..d2dd0a43297a 100755 --- a/paimon-python/pypaimon/tests/blob_table_test.py +++ b/paimon-python/pypaimon/tests/blob_table_test.py @@ -2823,9 +2823,17 @@ def write_blob_data(thread_id, start_id): 'error': str(e) }) - # Create and start multiple threads + # Create and start multiple threads. Keep this modest (3 vs. the + # original 10) because GHA runners under load can't drain 10 + # simultaneously-conflicting commits even with + # ``commit.max-retries=50`` (50 attempts * 30s back-off ~25 min, + # still timing out in CI). At 5 threads we still saw a different + # flake — read end occasionally observed only 4 of the 5 commits' + # rows (race between commit visibility and the immediate read). + # Three threads exercises the retry path while keeping the + # contention density low enough that GHA can drain reliably. threads = [] - num_threads = 10 + num_threads = 3 for i in range(num_threads): thread = threading.Thread( target=write_blob_data, diff --git a/paimon-python/pypaimon/tests/reader_append_only_test.py b/paimon-python/pypaimon/tests/reader_append_only_test.py index c4763dd99e23..f134d94e8ec5 100644 --- a/paimon-python/pypaimon/tests/reader_append_only_test.py +++ b/paimon-python/pypaimon/tests/reader_append_only_test.py @@ -572,7 +572,16 @@ def test_concurrent_writes_with_retry(self): for test_iteration in range(iter_num): # Create a unique table for each iteration table_name = f'default.test_concurrent_writes_{test_iteration}' - schema = Schema.from_pyarrow_schema(self.pa_schema) + # Concurrent commits are expected here; enlarge the retry budget so the + # default (commit.max-retries=10, commit.max-retry-wait=1s) does not + # exhaust under heavy CI load and produce a flaky failure. + schema = Schema.from_pyarrow_schema( + self.pa_schema, + options={ + 'commit.max-retries': '50', + 'commit.max-retry-wait': '30s', + }, + ) self.catalog.create_table(table_name, schema, False) table = self.catalog.get_table(table_name) @@ -614,9 +623,15 @@ def write_data(thread_id, start_user_id): 'error': str(e) }) - # Create and start multiple threads + # Create and start multiple threads. Keep this modest (3 vs. the + # original 10) because GHA runners under load can't drain 10 + # simultaneously-conflicting commits even with + # ``commit.max-retries=50`` (50 attempts * 30s back-off ~25 min, + # still timing out in CI). Three threads exercises the retry path + # without pushing each iteration past the per-test wall-time + # budget. threads = [] - num_threads = 10 + num_threads = 3 for i in range(num_threads): thread = threading.Thread( target=write_data,