[
http://jira.amdatu.org/jira/browse/AMDATU-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10984#comment-10984
]
Ivo Ladage - van Doorn commented on AMDATU-312:
-----------------------------------------------
Indeed, rowkeys are not removed when a Role is removed from the Role CF. So
get_range_slices() will build and return a List of many key slices (one for
each row ever created). It then loops over all keyslices and verifies that the
column size is > 0, if so the key is added to another list which is returned at
the end of the iteration. So it seems that this approach will cause issues when
many records are created/removed from the same CF.
See also:
http://wiki.apache.org/cassandra/FAQ#range_ghosts
However, the biggest problem seems to be the number of invocations of
getRowKeys for this CF, which is over 20 times for just one call to
/rest/users/users. Reason is the way authorization checks are implemented in
Pax; it just retrieves all roles and verifies if the user is member of it.
I guess the best way to properly fix this is to provide another decorator on
top of UserAdmin cassandra storage implementing a cache. Note that unlike the
tenant case, changes in roles can be made by other means then just invoking the
API (i.e. cassandra clustering)
> Major performance decrease when adding/removing users
> -----------------------------------------------------
>
> Key: AMDATU-312
> URL: http://jira.amdatu.org/jira/browse/AMDATU-312
> Project: Amdatu
> Issue Type: Bug
> Components: Amdatu Cassandra
> Affects Versions: 0.1.1
> Reporter: Ivo Ladage - van Doorn
> Assignee: Ivo Ladage - van Doorn
> Fix For: 0.1.1
>
>
> If you run the JMeter plans in this order, you will find that when you run
> the last plan there is a significant performance slowdown in Cassandra:
> - Amdatu Get Users - 0.1.0.jmx
> - Amdatu UserAdmin - 0.1.0.jmx for some time (i.e. 2 minutes)
> - Amdatu Get Users - 0.1.0.jmx
> Note that at this time there will only be a few users available in UserAdmin,
> still Cassandra queries on the CF Role take a very very long time. Using
> YourKit it seems that all rowkeys of previous users still exist as it is very
> busy with;
> com.google.common.base.Preconditions.checkState(boolean)
> com.google.common.collect.AbstractIterator.hasNext()
> invoked 532000 times from
> org.apache.cassandra.thrift.CassandraServer.get_range_slices(ColumnParent,
> SlicePredicate, KeyRange, ConsistencyLevel)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers