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

Rolling upgrade support #1340

Closed
wants to merge 3 commits into from

Conversation

maniksurtani
Copy link
Member

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

  • The 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.
  • Some of the code in the 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

@ghost ghost assigned tristantarrant Sep 26, 2012
@tristantarrant
Copy link
Member

Looking into this

val combinedKeyset = new java.util.HashSet[ByteArrayKey]()

for (future <- new IteratorWrapper(keysets.iterator())) {
combinedKeyset addAll future.get()
Copy link
Member

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@maniksurtani
Copy link
Member Author

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.

@tristantarrant
Copy link
Member

Pulling

@tristantarrant
Copy link
Member

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
Copy link
Member

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).

@galderz
Copy link
Member

galderz commented Oct 2, 2012

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();
Copy link
Member

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants