in dnq-transient-store/src/main/kotlin/com/jetbrains/teamsys/dnq/database/TransientSessionImpl.kt [182:205]
override fun flush(): Boolean {
if (store.threadSession !== this) throw IllegalStateException("Cannot commit session from another thread")
logger.debug("Intermediate commit transient session ${this}")
assertOpen("flush")
if (changes.isEmpty()) {
logger.trace("Nothing to flush")
} else {
flushChanges()
changes.clear()
loadedIds = EntityIdSetFactory.newSet()
val oldChangesTracker = transientChangesTracker
closePersistentSession()
this.store.persistentStore.beginReadonlyTransaction()
this.changesTracker = ReadOnlyTransientChangesTrackerImpl(snapshot)
notifyFlushedListeners(oldChangesTracker)
}
return true
}