Reduced coordinate routing contention

- Published history router reads bypass the attachment monitor
- Missing router reads retain synchronized attachment and detach checks
- Concurrent tests cover published reads and pending lifecycle changes
This commit is contained in:
Brian Neumann-Fopiano committed 2026-09-06 14:21:07 -04:00
1 parent bfaacb4d38
commit eb43cc44fa
2 files changed
+122 -1

No files matched your search

@@ -992,6 +992,10 @@ public class IrisEngine implements Engine {
}
public Optional<GenerationHistoryRuntimeRouter> getGenerationHistoryRuntimeRouter() {
GenerationHistoryRuntimeRouter router = generationHistoryRuntimeRouter;
if (router != null) {
return Optional.of(router);
}
synchronized (generationHistoryRuntimeRouterLock) {
return Optional.ofNullable(generationHistoryRuntimeRouter);
}
@@ -1001,7 +1005,10 @@ public class IrisEngine implements Engine {
int blockX,
int blockZ
) throws IOException {
GenerationHistoryRuntimeRouter router;
GenerationHistoryRuntimeRouter router = generationHistoryRuntimeRouter;
if (router != null) {
return router.openCoordinateScope(blockX, blockZ);
}
synchronized (generationHistoryRuntimeRouterLock) {
router = generationHistoryRuntimeRouter;
if (router == null && generationHistoryRoutingRequired) {