[indexes] IJPL-2966: expose MMappedFileStorage.getCloseStackTrace()

+ to be used in derived storages, for more detailed diagnostics of 'storage closed' scenarios

GitOrigin-RevId: 0c93894a7cf93b622d1ed8b480892fb2d9822ddb
This commit is contained in:
Ruslan Cheremin
2025-12-15 15:03:57 +00:00
committed by intellij-monorepo-bot
parent 5097261502
commit 3b5c423585
@@ -413,6 +413,13 @@ public final class MMappedFileStorage implements Closeable, Unmappable, Cleanabl
}
}
/** @return stacktrace of place there storage was closed, or null, if it not yet closed */
public @Nullable Exception getCloseStackTrace() {
synchronized (pagesLock) {
return closeStackTrace;
}
}
private Page pageByIndexLocked(int pageIndex) throws IOException {
synchronized (pagesLock) {
if (!channel.isOpen()) {