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

Shared log counter #2

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Shared log counter #2

wants to merge 9 commits into from

Conversation

Naman-Monga
Copy link
Collaborator

Since we need to update the log counter in the capture logs task, and read it in the http server. Implemented an Arc (Mutex) to safely share the mutable reference across the service.

@roshanr95
Copy link
Member

What's the motivation for reading it in the http server?

@Naman-Monga
Copy link
Collaborator Author

What's the motivation for reading it in the http server?

We want 2 features

  1. to print the current log index which is exposed via a separate endpoint
  2. to use the counter as the default start log id for the /history call --> will print the last offset number of logs

@roshanr95
Copy link
Member

Can consider atomics if it's just a number

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