New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISPN-7847 Deprecate DeltaAware #5187
Conversation
rvansa
commented
Jun 8, 2017
- DeltaAware, CopyableDeltaAware, Delta, DeltaCompositeKey deprecated
- AdvancedCache.applyDelta deprecated, CacheImpl.applyDelta reimplemented using ReadWriteKeyValueCommand, permits to lock only on the main key
- ApplyDeltaCommand and Visitor.visitApplyDeltaCommand deprecated (implementation removed)
- DeltaAwareCacheEntry, DeltaAwareObjectOutput and some internal helpers removed
3 related failures |
I've removed the three failing tests; these are no longer applicable because |
Last build din't work, but there was a build from 2 days back that run fine. Do you want to wait for another CI run? |
@galderz Not really, but I see there is a conflict now :-/ |
@galderz Rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one small bug found :)
it looks good to me. It is good to see some code removed :) Nice job
DataWriteCommand command; | ||
if (value instanceof Delta) { | ||
command = createApplyDelta(key, (Delta) value, explicitFlags, ctx); | ||
} if (value instanceof DeltaAware && (explicitFlags & FlagBitSets.CACHE_MODE_LOCAL) == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug: else
is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well spotted! :)
deltaAware = ((CopyableDeltaAware) value).copy(); | ||
} else if (value instanceof DeltaAware) { | ||
try { | ||
byte[] bytes = marshaller.objectToByteBuffer(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rvansa Could it use MergeOnStore
instead? Not that I think MergeOnStore
is a good idea, but it seems quite close to the semantics of non-copyable DeltaAware
.
@@ -272,7 +267,7 @@ private Object handleSecondPhaseCommand(TxInvocationContext ctx, TransactionBoun | |||
LocalTransaction localTx = (LocalTransaction) ctx.getCacheTransaction(); | |||
LocalizedCacheTopology cacheTopology = dm.getCacheTopology(); | |||
Collection<Address> affectedNodes = | |||
isReplicated ? null : cacheTopology.getWriteOwners(getAffectedKeysFromContext(ctx)); | |||
isReplicated ? null : cacheTopology.getWriteOwners((Collection<Object>) ctx.getAffectedKeys()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need the cast
@pruivo Thanks, rebased & fixed. |
Fixed conflict in documentation. |
@rvansa and @danberindei is there anything missing? |
@pruivo Just one more look... |
The purpose of What you wanted to compare is the |
@rvansa Ok, if you say |
@danberindei Once we had to add the check into the code, I made it public since I like extensibility in general. I hope I've defined the behaviour well enough. Maybe it was not a wise choice - if you feel strongly about it, we still have some time to hide the interface. The only thing I'd like to have in mind is that IMO AtomicMap should be moved to its own module in 10.0, rather than staying in core. |
Sorry this has conflicts now :( |
@rvansa needs rebase. @danberindei just press the button when finish the discussion :) |
Rebased. |
@rvansa Still getting a duplicate externalizer id error on my machine:
|
@rvansa |
* DeltaAware, CopyableDeltaAware, Delta, DeltaCompositeKey deprecated * AdvancedCache.applyDelta deprecated, CacheImpl.applyDelta reimplemented using ReadWriteKeyValueCommand, permits to lock only on the main key * ApplyDeltaCommand and Visitor.visitApplyDeltaCommand deprecated (implementation removed) * DeltaAwareCacheEntry, DeltaAwareObjectOutput and some internal helpers removed
@danberindei I've corrected the |
@rvansa That is surprising, considering that |
Looks like there some related failures http://ci.infinispan.org/job/Infinispan/job/PR-5187/58 |
Actually it looks like this was already failing http://ci.infinispan.org/job/Infinispan/job/master/lastSuccessfulBuild/#showFailuresLink |
Integrated into master, thanks @rvansa ! |