jshook/nosqlbench-2068-opspaces (#2069)

* force mappers to use op-contextual space bindings

* move space de-init to owner (adapter component)

* make specific adapters use op-contextual spaces
This commit is contained in:
Jonathan Shook
2024-11-05 16:59:28 -06:00
committed by GitHub
parent ea7fceae49
commit 722e8b53d8
40 changed files with 237 additions and 202 deletions

View File

@@ -265,16 +265,8 @@ public class StandardActivity<R extends java.util.function.LongFunction, S> exte
for (Map.Entry<String, DriverAdapter<CycleOp<?>,Space>> entry : adapters.entrySet()) {
String adapterName = entry.getKey();
DriverAdapter<?, ?> adapter = entry.getValue();
for (Space space : adapter.getSpaceCache()) {
if (space instanceof AutoCloseable autoCloseable) {
try {
// TODO This should be invariant now, remove conditional?
autoCloseable.close();
} catch (Exception e) {
throw new RuntimeException("Error while shutting down state space for " +
"adapter=" + adapterName + ", space=" + space.getName() + ": " + e, e);
}
}
if (adapter instanceof AutoCloseable autoCloseable) {
adapter.close();
}
}
}