Introduces two options for mod_roster and mod_roster_odbc:
- {versioning, true | false} Enable or disable roster versioning on ejabberd.
- {store_current_id, true | false} If true, the current roster version is stored on DB (internal or odbc). Otherwise it is calculated on the fly each time.
Performance:
Setting store_current_id to true should help in reducing the load for both ejabberd and the DB.
Details:
If store_current_id is false, the roster version is a hash of the entire roster. If store_current_id is true, the roster version is a hash, but of the current time
(this has to do with transactional semantics; we need to perform both the roster update and the version update on the same transaction, but we don't
have the entire roster when we are changing a single item on DB. Loading it there requires significant changes to be introduced, so I opted for this simpler approach).
In either case, there is no difference for the clients, the roster version ID is opaque.
IMPORTANT:
mod_shared_roster is not compatible with the option 'store_current_id'. Shared roster and roster versioning can be both enabled, but store_current_id MUST be set to false.
SVN Revision: 2428
* src/mod_roster.erl: When account is deleted, cancel presence
subscription for all roster items (EJAB-790)
* src/mod_roster_odbc.erl: Likewise
SVN Revision: 1943
* ejabberd_odbc:escape/1 now can escape binaries too. This
avoid the need to convert a binary value to list() just to
sql-escape it. The escaped value returned is allways a list()
(ejabberd's odbc drivers only works on lists())
SVN Revision: 1914
functions.
o Add guardians expression to exported functions to ensure at an early
stage that we were given the right arguments.
o Fix table conversion to exmpp; many fields were left as string(),
preventing matching from working correctly.
o In user_roster_item_parse_query/4, fix a bug where the same variable
was used for two distinct purpose.
o In user_roster_item_parse_query/4, fix a bad usage of
exmpp_jid:jid_to_list/1.
PR: EJABP-1
SVN Revision: 1867
o Fix some bugs by getting attributes as list() instead of binary().
o Instead creating #xmlattr directly, use the new ?XMLATTR macro; it'll
take care of the anything-to-binary() conversion.
o Fix a bug where recipient and sender were used as binary() instead of
list(), which is required by the rest of the S2S code.
o Fix a bug where binary_to_list/1 was called on a list().
Now concerning JIDs :
o Now that #jid{} isn't part of the API of Exmppp anymore, replace
remaining direct usages by calls to exmpp_jid.
o Replace exmpp_jid:make_bare_jid() by exmpp_jid:make_jid().
o Replace exmpp_jid:*_to_jid/1 by exmpp_jid:parse_jid/1.
PR: EJABP-1
SVN Revision: 1841
Included are fixes to src/mod_configure.erl and src/mod_caps.erl.
Note: this merge doesn't include the following revisions because it was
made by previous commits:
r1766, r1768, r1781, r1783, r1794, r1797, r1799, r1802.
Warning: Ejabberd may be broken until the merge is completly finished.
PR: EJABP-1
SVN Revision: 1829
Internal tables (ejabberd_router, ejabberd_sm, ejabberd_hooks, mod_last, mod_roster) use binary() as storage.
Basic test using the ODBC backend.
SVN Revision: 1770