I changed jid comparison logic to use hash of lowercased JID for comparison and not to lowercase original JID stored in database.
Only exception from this rule is Postgres schema as PostgreSQL allows creation of index of lowercased values of table columns - this provides us same feature with better performance as we do not need to calculate hash of lowercased JID.
I applied changes to UA schema and implementations as MA and UA schemas share tables.
wojciech.kapcia@tigase.net commented 8 years ago
I've reviewed the changes and they look OK. A couple of comments:
database/derby-message-archiving-schema-1.3.0.sql contains this line which updates the tables jid instead hashed filed:
update tig_ma_jids set jid = LOWER(jid), "domain" = LOWER("domain") where jid <> LOWER(jid) or "domain" <> LOWER("domain");
the tests seem to use UUID, which don't test case comparison/storing/retrieval.
Andrzej Wójcik (Tigase) commented 8 years ago
I removed this update statement and added separate test for jid comparison to AbstractMessageArchiveRepositoryTest class.