Skip to content

feat(BA-686): Implement Raftify KVS #3838

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

Draft
wants to merge 8 commits into
base: feat/create-raftify-client
Choose a base branch
from

Conversation

racheliee
Copy link
Contributor

resolves #3637 (BA-686)

about

Implements the Raftify KVS which emulates the APIs that AsyncEtcd offers. Allows raftify to fully cover the functions that etcd provides.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • Documentation
    • Contents in the docs directory
    • docstrings in public interfaces and type annotations

@HyeockJinKim HyeockJinKim changed the base branch from main to feat/create-raftify-client February 26, 2025 13:11
Comment on lines 82 to 84
"""
===================== Leadership and Redirection =====================
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh i just added it for my personal readability. i'll remove it before the merge

Comment on lines 61 to 68
apply_res = ApplyResult(
key=message.key,
old_value=old_value,
new_value=new_value,
revision=self._revision,
)

logger.debug(f"Applied: {apply_res}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you need to create an object just for debug logging?

Comment on lines 33 to 40
class HashStore:
_store: dict[str, Any]
_loop: asyncio.AbstractEventLoop
_revision: int

def __init__(self) -> None:
self._store: dict[str, Any] = {}
self._loop = asyncio.get_running_loop()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove unused _loop field.

@github-actions github-actions bot added size:XL 500~ LoC comp:manager Related to Manager component comp:common Related to Common component labels Feb 27, 2025
@github-actions github-actions bot added the comp:cli Related to CLI component label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:cli Related to CLI component comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Raftify KVS
2 participants