Commit 83fc32eb authored by Daniel Gerhardt's avatar Daniel Gerhardt

Merge branch 'fix-session-creation-perf' into '2.4'

Filter sessions on the DB side to check if key is available

See merge request !58
parents f80d2eab cdfc1c81
......@@ -499,9 +499,9 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware
}
@Override
@Transactional(isolation = Isolation.READ_COMMITTED)
public boolean sessionKeyAvailable(final String keyword) {
final View view = new View("session/by_keyword");
view.setKey(keyword);
final ViewResults results = getDatabase().view(view);
return !results.containsKey(keyword);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment