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

Refactor aloc_sink #3058

Merged
merged 5 commits into from
Nov 18, 2019
Merged

Refactor aloc_sink #3058

merged 5 commits into from
Nov 18, 2019

Conversation

slfritchie
Copy link
Contributor

Split the aloc_sink code into pieces that implement sink protocol & internal logic separately from what's necessary to manage the sink's persistent state. Code that implements the former is not refactored and thus remains ugly. However, it's our sink protocol reference implementation, and it works. If/when we want to refactor it, we've got a solid baseline.

Reviewers should focus on the latter: managing the sink's persistent state. This refactoring is in advance of anticipated work that will send aloc_sink output to Kafka instead of the local file system. The API for the TwoPC_Output base class may not be perfect for the Kafka case, but @JONBRWN and I believe it's probably good enough for now. Suggestions for better Python style are appreciated.

* Parameterize using_2pc

* WIPs

* WIP cleanups ... self._txn_state mgmt is messed up

* Works for './master-crasher.sh 2' and './master-crasher.sh 2 run_custom_tcp_crash0'

* Add TODO item

* Fix txnlog bug copy-and-paste-o
* WIP: change offset bookkeeping, broken!
* WIP: change offset bookkeeping, works!
* WIP: add TwoPC_TxnlogHelper

* Split aloc_sink and new aloc_sink_impl.py

* Adjust when a TwoPC_Output class is created
Copy link
Contributor

@JONBRWN JONBRWN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slfritchie this looks good to me based on my limited exposure to this side of the ALOC work. I think this is a good start and would be fine with this getting merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants