Project

General

Profile

Bug #9426

Failed to UPDATE when flushing an INVALID dmo

Added by Dănuț Filimon over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#2 Updated by Dănuț Filimon over 1 year ago

The stack trace:

update:828, Persister (com.goldencode.p2j.persist.orm)
save:840, Session (com.goldencode.p2j.persist.orm)
flushImpl:698, Validation (com.goldencode.p2j.persist.orm)
flush:643, Validation (com.goldencode.p2j.persist.orm)
validateUniqueIndices:513, Validation (com.goldencode.p2j.persist.orm)
validateMaybeFlush:364, Validation (com.goldencode.p2j.persist.orm)
validateMaybeFlush:11218, RecordBuffer (com.goldencode.p2j.persist)
flush:6954, RecordBuffer (com.goldencode.p2j.persist)
validate:6475, RecordBuffer (com.goldencode.p2j.persist)
validate:975, TxWrapper$WorkArea (com.goldencode.p2j.persist)
validate:1616, TxWrapper$AggresiveFlushWrapper (com.goldencode.p2j.persist)
processValidateImpl:10904, TransactionManager$WorkArea (com.goldencode.p2j.util)
processValidate:10858, TransactionManager$WorkArea (com.goldencode.p2j.util)
processValidate:10273, TransactionManager$TransactionHelper (com.goldencode.p2j.util)
run:-1, BlockManager$$Lambda$4827/0x00007ed48e416508 (com.goldencode.p2j.util)
executeStateManaged:12550, BlockManager (com.goldencode.p2j.util)
processForBody:9469, BlockManager (com.goldencode.p2j.util)
forEachWorker:11551, BlockManager (com.goldencode.p2j.util)
forEach:4843, BlockManager (com.goldencode.p2j.util)

The log:

24/12/05 05:20:24.344-0500 | WARNING | com.goldencode.p2j.persist.orm.Persister | ThreadName:Conversation [00000040:----------], Session:00000064, ThreadId:00000057, User:---------- | Failed to UPDATE #2305 of com.goldencode.p2j.persist.dynamic._temp.DynamicRecord63__Impl__.
SqlStmt{prep94968: update dtt63 set field1=?, field4=? where recid=? and _multiplex=? {1: CAST('testvalue' AS VARCHAR_IGNORECASE), 2: CAST('testvalue' AS VARCHAR_IGNORECASE), 3: 2305, 4: 3236}}

The fix is simple and straight forward:

diff --git a/src/com/goldencode/p2j/persist/RecordBuffer.java b/src/com/goldencode/p2j/persist/RecordBuffer.java
index de13877ec6..c20095bb2c 100644
--- a/src/com/goldencode/p2j/persist/RecordBuffer.java
+++ b/src/com/goldencode/p2j/persist/RecordBuffer.java
@@ -6413,7 +6413,8 @@ implements BufferReference,
       if (!isActive()                        ||
           currentRecord == null              ||
           !inChangeScope() && !isTransient() ||
-          currentRecord.checkState(DmoState.DELETING))
+          currentRecord.checkState(DmoState.DELETING) ||
+          currentRecord.checkState(DmoState.INVALID))
       {
          // nothing to do
          return;
but a minimal test case must be created to point out the actual issue. From what I've managed to discover, there is a validation error which makes the dmo INVALID then this record is flushed after a body block is executed.

The test provided in #9416 can be used to reproduce this issue and eventually create a smaller test.

#3 Updated by Dănuț Filimon over 1 year ago

After setting up an instance with the proper version and testing the test mentioned in #9416, the issue can't be reproduced anymore. I think this issue was a false alarm due to a specific configuration on the customer machine I debugged at the time.

I think this can be rejected/closed.

#4 Updated by Greg Shah over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Rejected

Also available in: Atom PDF