Skip to content

Commit

Permalink
Fixes flaky persistant storage lock test
Browse files Browse the repository at this point in the history
The persistant storage test was deemed flaky because of occasional
`XAmzContentSHA256Mismatch` errors. Several sources online claimed this
can be fixed by upgrading the aws-sdk

Also tweaks the test itself because `ReliableStorageLock` became unpicklable after
recent pybind changes.
  • Loading branch information
IvoDD committed Jan 20, 2025
1 parent b7afc10 commit 10c60e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cpp/vcpkg
Submodule vcpkg updated 1686 files
8 changes: 6 additions & 2 deletions cpp/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
},
{
"name": "aws-crt-cpp",
"version>=": "0.28.3"
"version>=": "0.29.7"
},
{
"name": "aws-c-mqtt",
"version>=": "0.11.0"
},
{
"name": "aws-c-s3",
Expand Down Expand Up @@ -104,7 +108,7 @@
],
"overrides": [
{ "name": "openssl", "version-string": "3.3.0" },
{ "name": "aws-sdk-cpp", "version": "1.11.405" },
{ "name": "aws-sdk-cpp", "version": "1.11.474" },
{ "name": "azure-core-cpp", "version": "1.12.0" },
{ "name": "benchmark", "version": "1.9.0" },
{ "name": "bitmagic", "version": "7.12.3" },
Expand Down
9 changes: 4 additions & 5 deletions python/tests/integration/arcticdb/test_storage_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
one_sec = 1_000_000_000


def slow_increment_task(lib, symbol, sleep_time, lock_manager, lock):
def slow_increment_task(lib, symbol, sleep_time):
lock = ReliableStorageLock("test_lock", lib._library, 10 * one_sec)
lock_manager = ReliableStorageLockManager()
lock_manager.take_lock_guard(lock)
df = lib.read(symbol).data
df["col"][0] = df["col"][0] + 1
Expand All @@ -24,7 +26,6 @@ def slow_increment_task(lib, symbol, sleep_time, lock_manager, lock):
lock_manager.free_lock_guard()


@pytest.mark.skip(reason="This test is flaky, skip it temporarily")
@pytest.mark.parametrize("num_processes,max_sleep", [(100, 1), (5, 20)])
@REAL_S3_TESTS_MARK
def test_many_increments(real_s3_version_store, num_processes, max_sleep):
Expand All @@ -33,11 +34,9 @@ def test_many_increments(real_s3_version_store, num_processes, max_sleep):
symbol = "counter"
lib.version_store.force_delete_symbol(symbol)
lib.write(symbol, init_df)
lock = ReliableStorageLock("test_lock", lib._library, 10 * one_sec)
lock_manager = ReliableStorageLockManager()

processes = [
Process(target=slow_increment_task, args=(lib, symbol, 0 if i % 2 == 0 else max_sleep, lock_manager, lock))
Process(target=slow_increment_task, args=(lib, symbol, 0 if i % 2 == 0 else max_sleep))
for i in range(num_processes)
]
for p in processes:
Expand Down

0 comments on commit 10c60e2

Please sign in to comment.