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

Configure output plugin with checkpoint initialized to newest/oldest message in queue #30

Closed
wants to merge 1 commit into from

Conversation

bbinet
Copy link
Contributor

@bbinet bbinet commented May 11, 2016

See #24.

If no checkpoint exists
e.g., initial_checkpoint = "oldest|newest" (defaulting to oldest, the current behaviour)

@bbinet
Copy link
Contributor Author

bbinet commented May 10, 2016

Should we rather change the initial_checkpoint config option name so that it can be a boolean value (true/false)?
Something like initial_checkpoint_newest = true|false (defaulting to false)?

@bbinet
Copy link
Contributor Author

bbinet commented May 11, 2016

e7376a3 adds support for initial_checkpoint_newest option for output plugins:
If no checkpoint exists, the checkpoint can now be initialized to the oldest/newest message with the following configuration:
initial_checkpoint_newest = true|false (defaulting to false)

If no checkpoint exists, the checkpoint can now be initialized to the
oldest/newest message with the following configuration:
initial_checkpoint_newest = true|false (defaulting to false)
@bbinet
Copy link
Contributor Author

bbinet commented May 30, 2016

FYI, I've rebased this branch on the latest master branch

@trink
Copy link
Contributor

trink commented Jun 8, 2016

The feature is fine but the implementation would have to change to play better with pruning (there are several ways this can happen but I haven't found anything I like yet) . I am heads down on the lua_sandbox work I need to get done so it is unlikely this will be addressed in Q2.

@bbinet
Copy link
Contributor Author

bbinet commented Jun 9, 2016

Ok. Please tell me if I can be of any help.

@trink
Copy link
Contributor

trink commented Sep 9, 2016

Proposal for Output Plugin Checkpoint Initialization

  1. When starting Hindsight, output plugins with no checkpoint entry should have their value set to the beginning (oldest data in the queue)
  • Pros
    • consistent with analysis plugins
    • easy to reason about (deterministic)
    • useful for testing/reporting (can quickly clear checkpoints and re-run data between executions)
  • Cons
    • none; If different behavior is desired (starting from the end, starting from message 23, whatever) the checkpoint file can be hand crafted or generated by a utility in a deterministic way creating reproducible behavior.
  1. When loading a dynamic output plugin with no checkpoint entry it should have its value set to the current location (end of the last message flushed to disk).
  • Pros
    • consistent with analysis plugins
    • eliminates race conditions with the pruner
  • Cons
    • Not really a con but historical data can only be processed with a Hindsight restart

Problems with the EOF checkpointing

  • the checkpoint will most likely be improperly positioned; i.e., not at the start of a message (the reader properly handles this but you would get a discarded byte count back indicating corruption where there really isn't any)
  • on startup it is non-deterministic where the plugin will actually start since the EOF can vary from run to run with each plugin startup time. For real-time this is a non-issue but it would not work in a test/debug scenario. We could make some changes to make it deterministic but at the moment there is no value/use case.

@bbinet @whd feedback?

@trink
Copy link
Contributor

trink commented Sep 9, 2016

Superseded by PR #52

@trink trink closed this Sep 9, 2016
@bbinet bbinet deleted the initial-checkpoint branch September 12, 2016 07:41
@bbinet
Copy link
Contributor Author

bbinet commented Sep 12, 2016

@trink Your proposal makes complete sense, thanks.

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.

None yet

2 participants