Hibernate Lost My Update
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Bartosz Osipiuk traced missing updates after pod shutdown to Hibernate skipping the final flush when its session factory is already closed. If Spring's SIGTERM handling closes the factory while a slow transaction runs, the commit saves only changes already sent, such as outbox inserts, with no exception and only a TRACE log. His demo app reproduces it, and he proposes a guard that rolls such commits back. The figures, including a roughly 1.2 ms window, come from his own tests and could not be independently checked.