Issue #2834: Transaction size limit

Type: Bug ReoprtVersion: 2.8.3Priority: NormalStatus: FixedReplies: 6
#1

Although I read in this post
https://www.objectdb.com/forum/2606
that the size of the transaction has no hard limit, our experience shows that we can not commit a transaction exceeding 2GB even though the ObjectDB server runs with Xmx15G.
We get the following exception in our JDO transaction in version 2.8.3_05 using client-server mode:

Caused by: java.lang.NegativeArraySizeException: -2147483648
        at com.objectdb.o.FIW.m(FIW.java:87)
        at com.objectdb.o.BYW.h(BYW.java:707)
        at com.objectdb.o.BYW.h(BYW.java:717)
        at com.objectdb.o.RQC.ZG(RQC.java:158)
        at com.objectdb.o.WSN.a(WSN.java:938)
        at com.objectdb.o.WSN.YL(WSN.java:677)
        at com.objectdb.o.STC.e(STC.java:533)
        at com.objectdb.o.SHN.F(SHN.java:564)
        at com.objectdb.o.SHN.w(SHN.java:171)
        at com.objectdb.o.HND.run(HND.java:134)
        at java.base/java.lang.Thread.run(Thread.java:833)

In such cases we have to split the transaction to smaller pieces and commit them more often.

The tricky part is to find out that we have this situation. The NegativeArraySizeException is not very intuitive. We would expect rather something like TransactionTooBigException.

But what would help us most, would be a way to check the current size of the transaction, so we could even prevent the overflow of array index. For example via providing a public method

Transaction.getSize()

This may not be possible as it is an interface in javax.jdo package. Maybe it could be solved via a special Query like "objectdb backup" which is used for online backuping.

#2

The stack trace indicates an exception in using recording.

Assuming recording is enable, could you please check whether the exception is still thrown when it is disabled?

ObjectDB Support
#3

You were right. With recording disabled, the exception was not thrown. So any suggestion how it should work correctly with recording.

#4

Could you please try build 2.8.8_04, which may solve the issue?

ObjectDB Support
#5

I tried it with 2.8.8_04 and I got this error:

Caused by: com.objectdb.o.InternalException: Unexpected Server Error
at com.objectdb.o.CLS.v(CLS.java:400)
at com.objectdb.o.CLS.z(CLS.java:352)
at com.objectdb.o.CLS.A(CLS.java:283)
at com.objectdb.o.CST.Y6(CST.java:772)
at com.objectdb.o.OBM.aR(OBM.java:990)
at com.objectdb.o.OBM.aU(OBM.java:890)
at com.objectdb.o.OBM.aH(OBM.java:790)
at com.objectdb.jpa.EMImpl.commit(EMImpl.java:292)
at eu.extech.db_utils.jdo.BasicJDOConnection.commitAndLeaveOpen(BasicJDOConnection.java:116)
... 10 more
Caused by: java.lang.OutOfMemoryError: Requested array size exceeds VM limit
at com.objectdb.o.FIW.m(FIW.java:89)
at com.objectdb.o.BYW.h(BYW.java:713)
at com.objectdb.o.BYW.h(BYW.java:723)
at com.objectdb.o.RQC.YP(RQC.java:158)
at com.objectdb.o.WSN.a(WSN.java:938)
at com.objectdb.o.WSN.Y6(WSN.java:677)
at com.objectdb.o.STC.e(STC.java:533)
at com.objectdb.o.SHN.G(SHN.java:564)
at com.objectdb.o.SHN.x(SHN.java:171)
at com.objectdb.o.HND.run(HND.java:134)
at java.base/java.lang.Thread.run(Thread.java:833)
#6

Build 2.8.8_05 includes an additional attempt to fix this exception.

ObjectDB Support
#7

The last version fixed the issue.

Thx.

Reply