powered by Jive Software

Monitoring - archive - attribute complete is always set to true

A defect is that the attribute ‘complete’ always is set to “true”, although there are more messages found then returned and the number of messages has been limited by the maximum size of the result page.

	<query xmlns='urn:xmpp:mam:2' >
		<x xmlns='jabber:x:data' type='submit'>
			<field var='FORM_TYPE' type='hidden'>
				<value>urn:xmpp:mam:2</value>
			</field>
			<field var='start'>
				<value>2019-09-29T11:11:40.928+00:00</value>
			</field>
			<field var='end'>
				<value>2019-11-29T11:11:40.929+00:00</value>
			</field>
		</x>
		<set xmlns='http://jabber.org/protocol/rsm'>
			<max>2</max>
		</set>
	</query>

Return two messages and a ‘fin’ result:

<fin xmlns="urn:xmpp:mam:2" complete="true" stable="true">
  <set xmlns="http://jabber.org/protocol/rsm">
    <count>616</count>
    <first>309e4431-c95d-46e8-8e59-9d3bab4f694c</first>
   <last>d1576b86-30e1-4c44-a486-87ab3fc24b60</last>
  </set>
 </fin>

there are 616 messages which fit in the criteria, but only the first two are returned.

My assumption is that the following line is incorrect:

com.reucon.openfire.plugin.archive.impl.MucMamPersistenceManager.findMessages(Date, Date, String, String, XmppResultSet, boolean)

 xmppResultSet.setComplete( msgs.size() <= maxResults );

should be

xmppResultSet.setComplete( totalCount <= maxResults );

Thanks for your detailed report. I’ve logged this as https://github.com/igniterealtime/openfire-monitoring-plugin/issues/62