added a new isolation-level TRANSACTION_SNAPSHOT in snappydata.thrift and as
IsolationLevel.SNAPSHOT_JDBC_LEVEL (both values =16); honour this as the supported
way to start snapshot transactions on a connection with standard commit/rollback
calls and avoid any special procedures for the same
treat TRANSACTION_SNAPSHOT as TRANSACTION_NONE otherwise when dealing with connection
to avoid creating any special GemFireXD distribution activations rather let all handling
be done at the GemFire TXState layer
removed special handling for snapshot transactions in GemFireTransaction and related classes
updated Snapshot
added a new "commitTransactionWithResults" API to snappydata.thrift that also returns
the before-commit results in a comma-separated string format; use the same in
ClientConnection and a new method getLastCommitResults to obtain the same
removed the special procedures added for snapshot transactions START_SNAPSHOT_TXID,
COMMIT_SNAPSHOT_TXID, ROLLBACK_SNAPSHOT_TXID, GET_SNAPSHOT_TXID_AND_HOSTURL after the
above changes; only one remaining is USE_SNAPSHOT_TXID for possible future use to
enforce an existing transaction on a new connection
changed default ResultSet holdability to ResultSet.CLOSE_CURSORS_AT_COMMIT for
EmbedConnection (it was already the default in ClientConnection and thrift); fixed
DDLUtils' JdbcSupport to explicitly have autocommit as false after this change
added "delayRollover" boolean property in thrift's StatementAttrs to allow setting
the same in a statement execution instead of requiring a separate procedure call
added support for setting snapshot isolation level using "SET ISOLALATION SNAPSHOT" SQL
regenerated java thrift client files for above additions
removed setting of batchId when creating ColumnBatch in delta buffer rollover
rather let the batchId be generated in usual way which then sets a thread-local
for the caller in BucketRegion to read (currently only used for logging)
minor change to default incoming queue size
handle ReplyMessage deserialization errors
for the case of ReplyMessage deserialization errors, process them locally as a
ReplyMessage with exception rather than sending a failure message to sender node
invoke close() for iterators when switching buckets in PRLocalScanIterator or switching to
remote iterator
log a message at the end if distribution was eventually successful if a warning message
was previously logged for distribution taking too long
check for snapshot for Region.get/getAll too
lookup the old entries from snapshot for get/getAll too (TXState.getLocally);
current code does snapshot old entries lookup only for iterator
explicitly rollback the transaction if a before-commit action fails
added handling for null LCC in thrift's SnappyDataServiceImpl for the corner case where
a connection is lost due to unexpected exceptions
Changes proposed in this pull request
removed special handling for snapshot transactions on TXManagerImpl and EmbedConnection:
added a new isolation-level TRANSACTION_SNAPSHOT in snappydata.thrift and as IsolationLevel.SNAPSHOT_JDBC_LEVEL (both values =16); honour this as the supported way to start snapshot transactions on a connection with standard commit/rollback calls and avoid any special procedures for the same
treat TRANSACTION_SNAPSHOT as TRANSACTION_NONE otherwise when dealing with connection to avoid creating any special GemFireXD distribution activations rather let all handling be done at the GemFire TXState layer
removed special handling for snapshot transactions in GemFireTransaction and related classes
updated Snapshot
added a new "commitTransactionWithResults" API to snappydata.thrift that also returns the before-commit results in a comma-separated string format; use the same in ClientConnection and a new method getLastCommitResults to obtain the same
removed the special procedures added for snapshot transactions START_SNAPSHOT_TXID, COMMIT_SNAPSHOT_TXID, ROLLBACK_SNAPSHOT_TXID, GET_SNAPSHOT_TXID_AND_HOSTURL after the above changes; only one remaining is USE_SNAPSHOT_TXID for possible future use to enforce an existing transaction on a new connection
changed default ResultSet holdability to ResultSet.CLOSE_CURSORS_AT_COMMIT for EmbedConnection (it was already the default in ClientConnection and thrift); fixed DDLUtils' JdbcSupport to explicitly have autocommit as false after this change
added "delayRollover" boolean property in thrift's StatementAttrs to allow setting the same in a statement execution instead of requiring a separate procedure call
added support for setting snapshot isolation level using "SET ISOLALATION SNAPSHOT" SQL
regenerated java thrift client files for above additions
removed setting of batchId when creating ColumnBatch in delta buffer rollover rather let the batchId be generated in usual way which then sets a thread-local for the caller in BucketRegion to read (currently only used for logging)
minor change to default incoming queue size
handle ReplyMessage deserialization errors
for the case of ReplyMessage deserialization errors, process them locally as a ReplyMessage with exception rather than sending a failure message to sender node
invoke close() for iterators when switching buckets in PRLocalScanIterator or switching to remote iterator
log a message at the end if distribution was eventually successful if a warning message was previously logged for distribution taking too long
check for snapshot for Region.get/getAll too
lookup the old entries from snapshot for get/getAll too (TXState.getLocally); current code does snapshot old entries lookup only for iterator
explicitly rollback the transaction if a before-commit action fails
added handling for null LCC in thrift's SnappyDataServiceImpl for the corner case where a connection is lost due to unexpected exceptions
updated slf4j version
Patch testing
precheckin -Pstore, transactional hydra tests
Is precheckin with -Pstore clean?
yes
ReleaseNotes changes
NA
Other PRs
https://github.com/TIBCOSoftware/snappydata/pull/1564