Open Replica read-only when possible (#3776)

* Open Replica read-only when possible

Specifically, when either
 - the command is read-only; or
 - the command requires GC (including recurrence updates) but GC is disabled by config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Dustin J. Mitchell 2025-02-14 04:25:19 -05:00 committed by GitHub
parent a97deb0c84
commit a701f8fc7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 121 additions and 17 deletions

View file

@ -47,6 +47,7 @@ int TEST_NAME(int, char**) {
UnitTest t(1);
Context context;
Context::setContext(&context);
context.tdb2.open_replica_in_memory();
// Ensure environment has no influence.
unsetenv("TASKDATA");