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

Validate diskFrontier domain for series candidate. #115

Merged
merged 1 commit into from Apr 9, 2013

Conversation

matttproud
Copy link
Member

Code Review

@juliusv please note that b87766021e70#L0R98 causes ./rules/... tests to abort. Could you please have a look at that?

Change Description

It is the case with the benchmark tool that we thought that we
generated multiple series and saved them to the disk as such, when
in reality, we overwrote the fields of the outgoing metrics via
Go map reference behavior. This was accidental. In the course of
diagnosing this, a few errors were found:

  1. newSeriesFrontier should check to see if the candidate fingerprint is within the given domain of the diskFrontier. If not, as the contract in the docstring stipulates, a nil seriesFrontier should be emitted.
  2. In the interests of aiding debugging, the raw LevelDB levigoIterator type now includes a helpful forensics String() method.

This work produced additional cleanups:

  1. Close() error with the storage stack is technically incorrect, since nowhere in the bowels of it does an error actually occur. The interface has been simplified to remove this for now.

@discordianfish
Copy link
Member

Can't really say what those changes are exactly doing, but what I understand looks reasonable. So 👍

@juliusv
Copy link
Member

juliusv commented Apr 8, 2013

@matttproud I found out the problems with the rules tests: there are two pernicious bugs in fingerprinting code. I'll send PRs to fix them.

@matttproud
Copy link
Member Author

Oof. Can't wait to see the P.R.
On Apr 8, 2013 1:51 PM, "juliusv" notifications@github.com wrote:

@matttproud https://github.com/matttproud I found out the problems with
the rules tests: there are two pernicious bugs in fingerprinting code. I'll
send PRs to fix them.


Reply to this email directly or view it on GitHubhttps://github.com//pull/115#issuecomment-16046018
.

@juliusv
Copy link
Member

juliusv commented Apr 9, 2013

Please rebase on master once #121 is merged.

It is the case with the benchmark tool that we thought that we
generated multiple series and saved them to the disk as such, when
in reality, we overwrote the fields of the outgoing metrics via
Go map reference behavior.  This was accidental.  In the course of
diagnosing this, a few errors were found:

1. ``newSeriesFrontier`` should check to see if the candidate fingerprint is within the given domain of the ``diskFrontier``.  If not, as the contract in the docstring stipulates, a ``nil`` ``seriesFrontier`` should be emitted.

2. In the interests of aiding debugging, the raw LevelDB ``levigoIterator`` type now includes a helpful forensics ``String()`` method.

This work produced additional cleanups:

1. ``Close() error`` with the storage stack is technically incorrect, since nowhere in the bowels of it does an error actually occur.  The interface has been simplified to remove this for now.
@@ -298,8 +295,6 @@ func (f *memoryToDiskFlusher) ForStream(stream stream) (decoder storage.RecordDe
flusher: f,
}

// fmt.Printf("fingerprint -> %s\n", model.NewFingerprintFromMetric(stream.metric).ToRowKey())
Copy link
Member

Choose a reason for hiding this comment

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

Remove cruft

Copy link
Member

Choose a reason for hiding this comment

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

Oh duh, it's removed, not added. Ignore.

@juliusv
Copy link
Member

juliusv commented Apr 9, 2013

👍

matttproud added a commit that referenced this pull request Apr 9, 2013
Validate diskFrontier domain for series candidate.
@matttproud matttproud merged commit 6146116 into master Apr 9, 2013
@matttproud matttproud deleted the fix/storage/nil-behaviors branch April 9, 2013 10:08
simonpasquier pushed a commit to simonpasquier/prometheus that referenced this pull request Oct 12, 2017
List histogram in the metric types overview
codesome pushed a commit to codesome/prometheus that referenced this pull request Jul 29, 2019
slashpai referenced this pull request in slashpai/prometheus Mar 4, 2022
krya-kryak pushed a commit to krya-kryak/prometheus that referenced this pull request Mar 4, 2022
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

3 participants