Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shmem6: support incremental loading in memmgr #51

Merged
merged 24 commits into from
Jun 27, 2014
Merged

Shmem6: support incremental loading in memmgr #51

merged 24 commits into from
Jun 27, 2014

Conversation

jinmei
Copy link
Contributor

@jinmei jinmei commented Jun 20, 2014

This set of changes allows memmgr to load zone data incrementally. The primary benefit of this feature is that it can now drop the attempt of loading a very large zone if it's canceled due to datasrc reconfig or shutdown.

It also makes memmgr more responsible while loading. Due to the global locking of python threads, the builder and main threads of memmgr do not actually run in parallel, so unless the load is incremental the main thread could block while the builder thread is loading a large zone.

The first few commits (up to 8ef008d) are just internal refactoring and cleanups of the ZoneDataLoader class. On top of that, commits up to 2a604ea implement the necessary feature to enable the incremental loading in the C++ datasrc library. The rest of the changes are its python wrapper and the use of it from memmgr.

jinmei added 24 commits June 18, 2014 21:37
also, extract its initialization code into a separate method.
also renamed ZoneDataLoaderHelper to ZoneDataUpdaterHelper, as that's more
appropriate (it's a wrapper for ZoneDataUpdater), and diff-based loader is
actually updating a zone, rather than fully loading it.
…asses

this will make the code more readable by avoiding indirection of functors.
this will make it more readable by reducing the indirection of functor.
also, moved construction of MasterLoader from updateRRsets to initUpdate
(which has been actually part of initialization, but had been deferred until
the actual load time due to internal restriction.  thanks to the set of
refactoring we don't have such restriction anymore).
…ses.

this will help simplify the ZoneDataLoader constructor and make it more
readable.
…with it.

as a result, the return type of load() can just be ZoneData* (again).  The
separation will be useful when we introduce incremental loading.
also added a test case, and another, unrelated test related to incremental
loading.
also, it now always raises exceptions on error even if catch_error is True,
as it's reportedly more pythonic.  existing tests were adjusted for these.
this will help perform shutdown or reconfigure more rapidly, even in the
middle of loading a very large zone.
@jinmei
Copy link
Contributor Author

jinmei commented Jun 27, 2014

now merging, will create a separate issue for the review.

jinmei added a commit that referenced this pull request Jun 27, 2014
Shmem6: support incremental loading in memmgr
@jinmei jinmei merged commit c6a31ee into master Jun 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant