LRU crawler "metadump" command and refactor#193
Closed
dormando wants to merge 12 commits into
Closed
Conversation
is_listen_thread() was removed from service after the new listen sockets were added. this removes the rest of the code.
Functionality is nearly all there. A handful of FIXME's and TODO's to address. From there it needs to be refactored into something proper.
it's useful to see when this happens in realtime right now.
... instead of reltime.
not 100% sure if it should do this in all cases, or only if the current crawl type requested it. this is difficult to test. while using a print in the early return condition I could occasionally get it to fire once. this may not be correct yet.
also fixes a bug where metadump was closing the client connection after a single slab class. not ported to the logger yet.
now has internal module system for the LRU crawler. autocrawl checker should be a bit better now. doesn't constantly re-run the histogram calcs. metadump works as a module now. ended up generalizing the client case outside of the module system since it looks reusable. Cut the amount of functions required for metadump specifically to nothing. still need to bug hunt, a few more smaller refactors, and see about pulling this out into its own file.
-I 2m would still allocate 2mb pages, then only use 1mb of it, halving memory capacity.
~600 lines gone from items.c makes it a lot more manageable. this change is almost purely moving code around and renaming functions. very little logic has changed.
|
Is "does hold locks" meant to read "does not hold locks"? |
Member
Author
|
Yes, thank you! Text updated. |
Member
Author
|
merged |
|
memcached-1.4.31 $m = new Memcached(); result: What version with recommendations? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finally! You can dump the cache. metadata.
lru_crawler metadump [x,y,x|all]ie:
lru_crawler metadump allDumps output in the form
key=foo cas=1\netc from the bottom of the cache up to the top.Notes:
Other improvements:
This feature and fixes have been sponsored by Netflix. Much thanks goes out to them for investing the time to do this feature correctly and ensure it is thoroughly tested.
As of this writing the feature is still being tested but the PR is ready to be opened and staged while we wait. Although there's more I'd like to do, I can do that on my own in future releases :) At this point the code is stabilized and we're only looking for bugs and some minor additions to the dump output.