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

shmem/mmap support: handle full datasrc reconfig #45

Merged
merged 30 commits into from
Jun 18, 2014
Merged

shmem/mmap support: handle full datasrc reconfig #45

merged 30 commits into from
Jun 18, 2014

Conversation

jinmei
Copy link
Contributor

@jinmei jinmei commented Jun 13, 2014

This set of changes update bundy-memmgr and bundy-auth so they can handle full reconfiguration of data sources (the data_sources configuration item).

  • on receiving a new generation of data source configuration, memmgr sends a release message to segment readers
  • memmgr also constructs memory segments for the new generation
  • auth keeps the old generation of configuration and corresponding release command until all segments of the new generation is are ready for use
  • when the new generation is ready, auth switches to the new segments, releases all references to segments of the old generation and sends acknowledgment to the release command
  • memmgr removes mapped files once it receives a release command from all old readers

The first half of the changes are for memmgr (up to commit 9864dfa), and the rest is for auth. These are independent and can be reviewed separately, but the entire set of changes will be needed for the system to work correctly.

jinmei added 30 commits June 12, 2014 21:25
on second thought, it seems sufficient to only work on the current data src
info for the case of data source reconfiguration.
this simplifies the main cases as we can assume there's at least one generation
of data sources.
this seems to be convenient for expected usage later.
… ack.

that's possible depending on the timing.  helper function isn't needed anymore
so removed.
this is a necessary cleanup on migrating a generation of data sources to
another.
…d reader

this should complete the memmgr side of data source reconfiguration.
not just "classes", but also "_generation_id".  (the latter is not yet used
for now).
…g sgmt.

we'll store them in a placeholder structure until all segments are ready
(not done in this commit).  also retrieve the gen ID from the passed config.
…hes.

and also perform swap if the pending data are ready as a result of the update.
also corrected typo in the builder side.
also added some test cases and a log message.
also, generalized the name of 'reconfigureDone' so it can be used for other
purposes (specifically for release_segment).
to determine whether to subscribe/unsubscribe the SegmentReader group.
checking the running config does not work anymore because we now don't
start using a new generation of config until all waiting segments are reset
(besides, hardcoding "mapped" type was not really good as there could be
other shared-type of memory segments).
so each command handle can control whether/which callbacks should be called
when more freely.  this will be needed for release_segments commands.
also, a minimum framework for release_segments was added.
this should complete the support for datasrc reconfig with memory segments
in bundy-auth.
@jinmei
Copy link
Contributor Author

jinmei commented Jun 18, 2014

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

jinmei added a commit that referenced this pull request Jun 18, 2014
shmem/mmap support: handle full datasrc reconfig
@jinmei jinmei merged commit 3182728 into master Jun 18, 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