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

Added context.Context to public methods #65

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

thrawn01
Copy link
Collaborator

@thrawn01 thrawn01 commented Feb 6, 2025

Purpose

All public methods which make network calls or await on flush should accept a context.Context which allows the caller to cancel the call if needed.

Implementation

  • Added context.Context to Put()
  • Added context.Context to PutWithOptions()
  • Added context.Context to Close()
  • Added context.Context to FlushWAL()
  • Added context.Context to TableStore methods
  • Modified the ReadOnlyBlob interface to accept context.Context

NOTE: Adding context to Close allows the caller to add a timeout to how long the caller is willing to wait for the database to flush all it's buffers and close the database safely.

@thrawn01 thrawn01 requested a review from naveen246 February 6, 2025 21:13
@thrawn01 thrawn01 self-assigned this Feb 6, 2025
@naveen246 naveen246 merged commit 0d5ab1e into main Feb 7, 2025
3 checks passed
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.

2 participants