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
Rolling upgrade support #1340
Rolling upgrade support #1340
Conversation
Looking into this |
val combinedKeyset = new java.util.HashSet[ByteArrayKey]() | ||
|
||
for (future <- new IteratorWrapper(keysets.iterator())) { | ||
combinedKeyset addAll future.get() |
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.
Maybe remove KNOWN_KEY from the set ?
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.
Done
…d cluster to a new one
…a well-known key, via JMX
Fixed. Nothing to do with a missing file, just that I renamed MigrationManager to RollingUpgradeManager and my IDE's refactoring tools conveniently ignored Scala source files. :) Fixed, rebased, etc., and all good to go. |
Pulling |
Pulled. We need some tests now :) |
} | ||
|
||
class IteratorWrapper[A](iter:java.util.Iterator[A]) { | ||
// TODO: should probably be in some generic scala helper module to allow scala-style iteration over java collections |
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.
No need for this. That's what scala.collection.JavaConversions is there for (used throughout the code base).
This really shouldn't have been pulled without proper tests :( |
@ManagedOperation(description = "Dumps the global known keyset to a well-known key for retrieval by the upgrade process") | ||
@Operation(displayName = "Dumps the global known keyset to a well-known key for retrieval by the upgrade process") | ||
public void recordKnownGlobalKeyset() { | ||
for (Migrator m: migrators.values()) m.recordKnownGlobalKeyset(); |
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.
Should we throw an exception if no migrators are found ?
This commit contains a basic version of the plan outlined in https://community.jboss.org/wiki/RollingUpgradesInInfinispan under section 1: Rolling upgrades for remote clients using Hot Rod
RollingUpgradeSynchronizer
could be better: controlled via JMX and not just the command line. And in the case of command-line, should ship with a set of scripts. But this can be integrated for now, and the additional pieces added in a separate commit.HotRodMigrator
can be abstracted into a generic class and reused for other migrators, for in-VM, memcached and REST, but this can be refactored when implementing phase 2 and 3 of the design.Relevant JIRAs can be found on https://community.jboss.org/wiki/RollingUpgradesInInfinispan, as well as https://issues.jboss.org/browse/ISPN-2345 and https://issues.jboss.org/browse/ISPN-2346