Build: #1280 was successful Scheduled with changes by Guus der Kinderen

Code commits

Openfire (master)

  • Guus der Kinderen

    Guus der Kinderen 794a3f19e4b9a35bb857554e38d715826db355fc

    OF-2511: Prevent loading unused historic messages for MUC rooms.
    Typically, rooms are configured to retain only 25 message of history, to be sent to clients that join a room (note that this does _not_ relate at all to MAM).

    When loading a room from the database, Openfire should not load _all_ messages from the database, but only the ones that are potentially going to be sent to clients. For rooms which a large history, this saves a considerable amount of resources.

    This commit uses somewhat of a hack that is based on database driver functionality (skipping ahead in the resultset), as opposed to modifying the SQL query that is used to obtain the records. Such modification would likely depend on non-standardized SQL staments (TOP / LIMIT / ROWNUM), which would introduce the need for database-vendor specific code.

    • xmppserver/src/main/java/org/jivesoftware/openfire/muc/HistoryStrategy.java (version 794a3f19e4b9a35bb857554e38d715826db355fc)
    • xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoomHistory.java (version 794a3f19e4b9a35bb857554e38d715826db355fc)
    • xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MUCPersistenceManager.java (version 794a3f19e4b9a35bb857554e38d715826db355fc)