powered by Jive Software

REST API to update roster item returns HTTP 200 OK, but the roster item is not updated.

Hello,

We use Openfire 4.1.6 and REST API Plugin 1.3.0.

We want to create roster items which subscription type “both” between two users. To create roster items, we use REST API.

For user A:

  1. get roster
  2. check existence of the roster item for user B.
    3.1. If no roster item, create roster item which subscription type “both” by REST API.
    3.2. If the roster items exists but which subscription type is not “both”, update roster item’s subscription type to “both” by REST API.

For user B:

  1. get roster
  2. check existence of the roster item for user A.
    3.1. If no roster item, create roster item which subscription type “both” by REST API.
    3.2. If the roster items exists but which subscription type is not “both”, update roster item’s subscription type to “both” by REST API.

We see strange behavior.

After creating roster item A => B, user B has roster item B => A but its subscription type is “none”. We call REST API to update subscription type, API returns HTTP 200 OK. But, after we update over 100 items, some items left as their subscription type as “none”. If script that calls API sleeps 100ms between two API calls, no trouble.

We have a doubt that why updating roster items SOMETIMES fails.
We can’t find such bugs from bug database and bulletin boards.

Do you know about such troubles?

Openfire … 4.1.6 build from source
Hazelcast Clustering Plugin … 2.2.1 build from source
REST API Plugin … 1.3.0 build from source
OS … CentOS 6.4
JRE

java version “1.7.0_09-icedtea”
OpenJDK Runtime Environment (rhel-2.3.8.0.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
RPM - java-1.7.0-openjdk-1.7.0.9-2.3.8.0.el6_4.x86_64

Best Regards,
Katsuhiro Mihara