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-2621 + ISPN-2606 Rolling Upgrades via HotRod #1523

Conversation

tristantarrant
Copy link
Member

ISPN-2621 + ISPN-2606 Rolling Upgrades via HotRod

https://issues.jboss.org/browse/ISPN-2621
Introduce an entry wrapping mechanism for RemoteCacheStore

https://issues.jboss.org/browse/ISPN-2606
Implement all phases of rolling upgrades using an MBean
Separate the concept of source and target migrators
Modify and document the upgrade CLI command to reflect all of the above

@ghost ghost assigned maniksurtani Dec 12, 2012
@@ -56,7 +56,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>infinispan-server-hotrod</artifactId>
<scope>test</scope>
<optional>true</optional>
Copy link
Member

Choose a reason for hiding this comment

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

Remote cache store depends on a Hot Rod server? :) Even if optional, surely this is just test-scope?

Copy link
Member Author

Choose a reason for hiding this comment

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

Two choices: move CacheValue out of server (into core maybe ?) or move the entrywrapper to server (nonsense imho).
This is actually not really that much of an issue since client and server will be colocated in the rolling upgrade scenario

Copy link
Member

Choose a reason for hiding this comment

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

I think this would be a temporary measure, Tristan had some nice ideas to avoid the need of wrapper classes around keys or values...

Copy link
Member

Choose a reason for hiding this comment

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

Another option would be to have CacheValue migrated to o.i.util. ByteArrayKey is already there...

Copy link
Member

Choose a reason for hiding this comment

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

+1 to move CacheValue to core

Copy link
Member Author

Choose a reason for hiding this comment

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

Wouldn't moving it in 5.2 cause problems ? I'm thinking about a JDBC cachestore containing serialized InternalCacheEntries containing serialized CacheValues that need deserializing.

Copy link
Contributor

Choose a reason for hiding this comment

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

@tristantarrant +1. I guess a better time for such changes is 6.0

Copy link
Member

Choose a reason for hiding this comment

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

If the CacheValue has an externalizer, I don't think changing the class name would break deserialization. Might be a problem in other areas though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's not be too adventurous here, the optional dependency is not ideal, but the consequences of moving classes around at this stage might be a bit too risky.


}
es.shutdown();
while (!es.isTerminated()) LockSupport.parkNanos(TimeUnit.NANOSECONDS.convert(100, TimeUnit.MILLISECONDS));
Copy link
Member

Choose a reason for hiding this comment

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

ExecutorService.awaitTermination?

Copy link
Member Author

Choose a reason for hiding this comment

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

while (!es.awaitTermination(100, TimeUnit.MILLISECONDS)); ?
(nanos seems a bit excessive, and I'm not really fussed about waiting for too long)

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, while awaitTermination() might be clearer to read, it has to be wrapped in a try/catch

Copy link
Member

Choose a reason for hiding this comment

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

Don't you want to stop waiting at some point?

I actually consider allowing interruptions a plus, so that it works with Future.cancel(), but that's your call.

@danberindei danberindei merged commit 77c809e into infinispan:master Dec 14, 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.

5 participants