The new writer query seems to be blocked by the existing opened array

Here is the first array object for reader
tiledb::Array array1(ctx, array_uri, TILEDB_READ);
vector buf1(4);
tiledb::Query query1(ctx, array1);
query1.set_subarray({1,4});
query1.set_layout(TILEDB_GLOBAL_ORDER);
query1.set_buffer(“a1”, buf1);
query1.submit();
query1.finalize();

While it remains open, I’d like to use a new writer to update the same uri
/*
* open it with another array object
*/
tiledb::Array array2(ctx, array_uri, TILEDB_WRITE);
vector buf2= {5,6,7,8};
tiledb::Query query2(ctx, array2);
query2.set_subarray({1,4});
query2.set_layout(TILEDB_GLOBAL_ORDER);
query2.set_buffer(“a1”, buf2);
query2.submit();
// query2.submit_async( { std::cout << “Callback: Query completed\n”; });
query2.finalize();

However it freezes at query2.finalize() step.
I tried submit_async(), but it doesn’t seem to actually write the buffer to disk.

Mike, apologies for that. It was a bug with an unnecessary use of an xlock on the write code path. We just fixed it with https://github.com/TileDB-Inc/TileDB/pull/1639 in dev. We are soon making a patch release that will include it. Thanks for finding it.

I works great now after the patch!