Skip to content
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-2089 Commit not working for distributed shared cache stores #1159

Merged
merged 1 commit into from
Jun 7, 2012

Conversation

galderz
Copy link
Member

@galderz galderz commented Jun 4, 2012

https://issues.jboss.org/browse/ISPN-2089

5.1.x branch: t_dist_shared_5

@buildhive
Copy link

Infinispan » infinispan #80 SUCCESS
This pull request looks good
(what's this?)

@ghost ghost assigned danberindei Jun 4, 2012
@@ -148,6 +149,14 @@ public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand comman
return invokeNextInterceptor(ctx, command);
}

@Override
public Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visitCommitCommand looks exactly the same as the overridden method in CacheStoreInterceptor. Do you really need the override?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I see now, the skip method called here does not override CSI.skip(InvocationContext, VisitableCommand).
I think it would be clearer if the skip method really did override the one in the base class and visitCommitCommand wouldn't be overridden.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that could work too. I'll have a look...

@galderz
Copy link
Member Author

galderz commented Jun 5, 2012

@danberindei I've updated the pull req, have a look :)

@buildhive
Copy link

@danberindei
Copy link
Member

Galder, DistSyncCacheStoreSharedTest.testClear() is now failing:

2012-06-05 20:36:56,263 ERROR (testng-DistSyncCacheStoreSharedTest) [org.infinispan.test.fwk.UnitTestTestNGListener] Method testClear(org.infinispan.distribution.DistSyncCacheStoreSharedTest) threw an exception
java.lang.AssertionError: Expected 1 but was 4
    at org.infinispan.distribution.DistSyncCacheStoreSharedTest.assertNumberOfInvocations(DistSyncCacheStoreSharedTest.java:126)
    at org.infinispan.distribution.DistSyncCacheStoreSharedTest.testClear(DistSyncCacheStoreSharedTest.java:221)

Looks like clear always needs to run on only one node, and using the overridden implementation of skip in DistCacheStoreInterceptor breaks that. I guess I should have just pushed your original commit :)

@danberindei
Copy link
Member

BTW Galder, buildhive seems to abort the build after 15 minutes, even though it says it waited 120 minutes...

@galderz
Copy link
Member Author

galderz commented Jun 6, 2012

@danberindei, I'll check clear.

WRT build, I changed it to do the full build cos they've changed the default to 120mins (I think I emailed the team about it), but 120 mins is not enough to run our full build in the env buildhive uses, so reverting to previous, compile only set up.

@galderz
Copy link
Member Author

galderz commented Jun 6, 2012

@danberindei Tbh, what's different here is clear(), that's different to all the rest of operations in dist cache store, so it makes sense to override it and make it behave as it should. commit() should have been acting like the rest of operations for a dist cache store, ignoring isOriginLocal(). I'll update asap...

@galderz
Copy link
Member Author

galderz commented Jun 6, 2012

@danberindei Pull req updated.

@buildhive
Copy link

Infinispan » infinispan #83 SUCCESS
This pull request looks good
(what's this?)

@danberindei
Copy link
Member

Galder, CacheLoaderManagerConfig.shared() doesn't exist in 5.1.x, so your 5.1.x branch doesn't compile.
Please change to isShared() and resubmit.

@buildhive
Copy link

Infinispan » infinispan #92 SUCCESS
This pull request looks good
(what's this?)

@galderz
Copy link
Member Author

galderz commented Jun 6, 2012

@danberindei Fixed... once buildhive or similar works, need to figure out a way for the hook to find other branches in the comments and fire builds for those :)

Pretty much all DIST cache store operations should check the locality
of keys and take that into account when making decisions to operate
on the cache store, except one, clear. Treat this special case
differently in a explicit way to avoid breaking functionality in the
future.
@danberindei danberindei merged commit 752f632 into infinispan:master Jun 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants