Skip to content

Commit

Permalink
chore: improved error message in corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Aug 27, 2023
1 parent 6413938 commit d7805b2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,8 @@ public void updateRecord(final Record record) {
public Document getOriginalDocument(final Record record) {
final Binary originalBuffer = ((RecordInternal) record).getBuffer();
if (originalBuffer == null)
throw new IllegalStateException("Cannot read original buffer");
throw new IllegalStateException(
"Cannot read original buffer for record " + record.getIdentity() + ". In case of tx retry check the record is created inside the transaction");
originalBuffer.rewind();
return (Document) recordFactory.newImmutableRecord(this, ((Document) record).getType(), record.getIdentity(), originalBuffer, null);
}
Expand Down

0 comments on commit d7805b2

Please sign in to comment.