pubsub publish - fix potential loop when an error condition occurs

Description

http://community.igniterealtime.org/message/197719

This problem was reported two times by admins who use Oracle RDBMS as the backend database. MySQL uses "MEDIUMTEXT" so there is o problem, HSQLDB stores even longer values in a "VARCHAR(4000)" field.
Best thing would be to change ofPubsubItem.payload from VARCHAR(4000) to CLOB or something like this.
Possible quick workaround: comment if (!success) { itemsToAdd.add(entry); } and log there an error instead.

Environment

Oracle

Activity

Show:
Tim Durden
January 6, 2016, 11:46 AM

Changed status from 'Patches Welcome' to 'Fixed'. Please raise new ticket if different is present (and link if appropriate).

Daryl Herzmann
October 26, 2015, 1:55 PM

Going to close this issue as per Robin's comment.

Robin Collier
April 17, 2014, 7:42 PM

This particular problem now references code that no longer exists. The bug as described would no longer occur, although errors would get logged and pubsub items would be lost if the payload is too large.

Items are buffered before being flushed to the db, and if such an error occurred, then the batch being flushed would likely be lost. Some testing would be required to confirm the side effects of such a published item.

The proper fix now is to validate the size of the payload when it is published and reply with the appropriate error when size limit is exceeded.

<error type='modify'>
<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<payload-too-big xmlns='http://jabber.org/protocol/pubsub#errors'/>
</error>

Guus der Kinderen
February 6, 2013, 7:57 PM

Removing the 'fix version' for all unresolved issues that were scheduled for version 7.8.2. We're releasing this version today - the remaining issues should be rescheduled later.

Fixed

Assignee

Unassigned

Reporter

LG