aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--storage/src/tests/persistence/filestorage/filestormanagertest.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
index 56149bbc14d..43e6bbe1c89 100644
--- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
+++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
@@ -411,9 +411,18 @@ TEST_F(FileStorManagerTest, feed_op_batch_updates_bucket_db_and_reply_bucket_inf
c.manager->getFileStorHandler().set_max_feed_op_batch_size(10);
BucketId bucket_id(16, 1);
createBucket(bucket_id);
+ // The persistence thread is already running at this point, and may not have observed the max
+ // batch size configuration change. Trigger an implicit thread barrier by roundtripping a message.
+ {
+ auto get = make_get_command(120, "id:foo:testdoctype1:n=1:0");
+ get->setAddress(_storage3);
+ c.top.sendDown(get);
+ c.top.waitForMessages(1, _waitTime);
+ (void)c.top.getRepliesOnce();
+ }
constexpr uint32_t n = 10;
{
- // Barrier to prevent any messages from being processed until we've enqueued all puts
+ // Explicit barrier to prevent any messages from being processed until we've enqueued all puts
auto guard = c.manager->getFileStorHandler().lock(makeDocumentBucket(bucket_id), LockingRequirements::Exclusive);
for (uint32_t i = 0; i < n; ++i) {
auto put = make_put_command(120, vespalib::make_string("id:foo:testdoctype1:n=1:%u", i), Timestamp(1000) + i);