kirklund commented on a change in pull request #7022:
URL: https://github.com/apache/geode/pull/7022#discussion_r734089057
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
##########
@@ -2497,4 +2500,38 @@ void updateSenderIdMonitor() {
void checkSameSenderIdsAvailableOnAllNodes() {
// nothing needed on a bucket region
}
+
+ @Override
+ public void txApplyPut(Operation putOp, Object key, Object newValue, boolean
didDestroy,
+ TransactionId transactionId, TXRmtEvent event, EventID eventId, Object
aCallbackArgument,
+ List<EntryEventImpl> pendingCallbacks, FilterRoutingInfo
filterRoutingInfo,
+ ClientProxyMembershipID bridgeContext, TXEntryState txEntryState,
VersionTag versionTag,
+ long tailKey) {
+
+ Object wrappedNewValue;
+ if (newValue instanceof CachedDeserializable || newValue instanceof byte[]
+ || Token.isInvalidOrRemoved(newValue)) {
+ wrappedNewValue = newValue;
+ } else if (newValue instanceof Delta) {
+ int vSize = CachedDeserializableFactory.calcMemSize(newValue,
+ getPartitionedRegion().getObjectSizer(), false);
+ wrappedNewValue = CachedDeserializableFactory.create(newValue, vSize,
cache);
+ } else {
+ byte[] serializedBytes = null;
+ if (txEntryState != null) {
+ serializedBytes = txEntryState.getSerializedPendingValue();
+ }
+
+ if (serializedBytes == null) {
+ serializedBytes = EntryEventImpl.serialize(newValue);
+ }
+
+ wrappedNewValue = CachedDeserializableFactory.create(serializedBytes,
cache);
+ }
+
+ super.txApplyPut(putOp, key, wrappedNewValue, didDestroy, transactionId,
event, eventId,
+ aCallbackArgument, pendingCallbacks, filterRoutingInfo, bridgeContext,
txEntryState,
+ versionTag, tailKey);
+ }
Review comment:
I think you should consider adding unit test and dunit coverage for
`BucketRegion.txApplyPut(...)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]