Excessive memory usage due to Accumulator updates inside single transaction
Bug #1028134 reported by
Nathan Williams
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Akiban Persistit |
Fix Released
|
Critical
|
Nathan Williams |
Bug Description
Persistit r337
An OutOfMemoryError was encountered and analysis of the (partial) heap dump showed that there were 40M Deltas taking up around 1.3G of memory. Code review showed that each delta inside of a transaction is allocated a unique object, no matter how many there are. In the scenario of a long running transaction that does many Accumulator updates, growth from Deltas is essentially unbounded.
A simple solution would be to combine Deltas that are from the same transaction, accumulator, and step into a single value.
Related branches
lp://staging/~nwilliams/akiban-persistit/combine-accumulator-deltas
- Peter Beaman: Approve
-
Diff: 328 lines (+189/-17)5 files modifiedsrc/main/java/com/persistit/Accumulator.java (+10/-10)
src/main/java/com/persistit/TransactionIndex.java (+41/-0)
src/main/java/com/persistit/TransactionIndexBucket.java (+1/-1)
src/test/java/com/persistit/AccumulatorTest.java (+129/-1)
src/test/java/com/persistit/unit/ConcurrentUtil.java (+8/-5)
visibility: | private → public |
Changed in akiban-persistit: | |
importance: | Undecided → Critical |
Changed in akiban-persistit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.