Run manually for releases

Build: #2 was successful Manual run by daryl herzmann

Code commits

Openfire (master)

  • Guus der Kinderen

    Guus der Kinderen 61de407dc5122f72b42f943437074853e6710400

    OF-2157: Ensure proper order of logged messages in cluster
    It is important to assign a message ID, which is used for ordering messages in a conversation, soon
    after the message arrived, as opposed to just before the message gets written to the database. In the latter
    scenario, the message ID values might no longer reflect the order of the messages in a conversation, as
    database writes are batched up together for performance reasons. Using these batches won't affect the
    database-insertion order (as compared to the order of messages in the conversation) on a single Openfire
    server, but when running in a cluster, these batches do have a good chance to mess up the order of things.

    • xmppserver/src/main/java/org/jivesoftware/openfire/archive/Archiver.java (version 61de407dc5122f72b42f943437074853e6710400)
    • xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/ConversationLogEntry.java (version 61de407dc5122f72b42f943437074853e6710400)
    • xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MUCPersistenceManager.java (version 61de407dc5122f72b42f943437074853e6710400)
  • Guus der Kinderen

    Guus der Kinderen 5412d8b9fce41af2705ce39834de821f4a823701

    OF-2157: refactor abort transaction logic

    • xmppserver/src/main/java/org/jivesoftware/database/SequenceManager.java (version 5412d8b9fce41af2705ce39834de821f4a823701)
  • Guus der Kinderen

    Guus der Kinderen 53da12baee1907bdeb803a62397596888391ec09

    OF-2159: Do not re-use origin-id when generating a stanza
    This fixes a misunderstanding of the text in the XEP. Although origin-id must be retained, its value shouldn't be re-used, as the local entity can't trust the owner to have used a unique value.

    • xmppserver/src/main/java/org/jivesoftware/openfire/stanzaid/StanzaIDUtil.java (version 53da12baee1907bdeb803a62397596888391ec09)
    • xmppserver/src/test/java/org/jivesoftware/openfire/stanzaid/StanzaIDUtilTest.java (version 53da12baee1907bdeb803a62397596888391ec09)
  • Guus der Kinderen

    Guus der Kinderen 0e5aaf9a8ddce9c461ffc3ee43f6135079b61295

    OF-2157: Sequence-manager should be cluster-aware
    Openfire has a 'sequence manager' that basically allows you to have unique numbers. We use this instead of a database autoincrement-like mechanism (which is different on every database, and thus hard to use generically in Openfire).

    As far as I know, the sequence manager works pretty well in a clustered setup, with one caveat: as the sequence manager obtains a 'block' of sequences to be used, different members might all obtain a block of their own. Although they'd still use distinct values from their blocks, there is no predicting the order in which the values are used. This results in the values added to the database to not be sequential.

    This is a problem for things like message logs, which assumes that each message in a conversation is ordered by ID.

    This commit ensures that sequence values are stored in a distributed cache, ensuring that all cluster members see the same values, and obtain 'next' sequences under lock.

    A drawback here is that there's database interaction (to obtain a new block of sequence values) while there's a cluster-wide lock). That will be limited to the specific sequence though.

    Arguably, not all code that uses sequence manager values require the values used to be actually sequential (having them unique might be good enough for some applications). There might be room for optimization here, although it feels safest for now to ensure that all applications do get sequential values, as suggested by the API of the implementation.

    As all database interaction is performed under a sequence-specific lock, there should not be a need to 'retry' (in case another process already modified the value). I've removed the retry logic that existed since 2004.

    • xmppserver/src/main/java/org/jivesoftware/database/SequenceManager.java (version 0e5aaf9a8ddce9c461ffc3ee43f6135079b61295)
    • xmppserver/src/main/java/org/jivesoftware/util/cache/CacheFactory.java (version 0e5aaf9a8ddce9c461ffc3ee43f6135079b61295)
  • Guus der Kinderen

    Guus der Kinderen fe0069307118963c9cd986d96a1600421651335b

    OF-2157: Remove unnecessairy transaction logic

    • xmppserver/src/main/java/org/jivesoftware/database/SequenceManager.java (version fe0069307118963c9cd986d96a1600421651335b)
  • Guus der Kinderen

    Guus der Kinderen ec298a3e1c9159fd79ef00da450b7a6569fe9e6d

    Improve type-safety by applying generics
    Non-fuctional change.

    • xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java (version ec298a3e1c9159fd79ef00da450b7a6569fe9e6d)
  • Guus der Kinderen

    Guus der Kinderen a21cba10b642efb005e94a6e03f112a5dc7ac88d

    OF-2153: Gracefully reject SM resumption on wrong cluster node
    Openfire currently does not allow XEP-0198 resumption on a cluster node different than the one that originally had the session.

    This commit adds exception handling for this scenario.

    • xmppserver/src/main/java/org/jivesoftware/openfire/streammanagement/StreamManager.java (version a21cba10b642efb005e94a6e03f112a5dc7ac88d)