yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #39692
[Bug 1503312] [NEW] Optimization: Don't rebuild revoke-tree in each validate-token call
Public bug reported:
For checking an entry in revocation_event table, keystone builds a tree
comprising all the entries in the table and searches for a matching
token by traversing the tree. Every validate token call rebuilds the
tree - this includes getting all entries from the db, converting them
into dict objects for manipulation and then building the tree. We
observed that the conversion of db entries to objects is what causes the
increase in latency and not the building of the tree or the tree
traversal. This conversion and subsequent rebuilds are unnecessary and
can be avoided. With this patch, the first call to the get_revoke_tree
method will build the tree and subsequent calls will not rebuild the
tree unless the tree has been invalidated by a new addition to the
revocation_event table.
** Affects: keystone
Importance: Undecided
Assignee: Sonali (sonali-pitre)
Status: New
** Tags: performance
** Changed in: keystone
Assignee: (unassigned) => Sonali (sonali-pitre)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1503312
Title:
Optimization: Don't rebuild revoke-tree in each validate-token call
Status in Keystone:
New
Bug description:
For checking an entry in revocation_event table, keystone builds a
tree comprising all the entries in the table and searches for a
matching token by traversing the tree. Every validate token call
rebuilds the tree - this includes getting all entries from the db,
converting them into dict objects for manipulation and then building
the tree. We observed that the conversion of db entries to objects is
what causes the increase in latency and not the building of the tree
or the tree traversal. This conversion and subsequent rebuilds are
unnecessary and can be avoided. With this patch, the first call to
the get_revoke_tree method will build the tree and subsequent calls
will not rebuild the tree unless the tree has been invalidated by a
new addition to the revocation_event table.
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1503312/+subscriptions
Follow ups