-
Notifications
You must be signed in to change notification settings - Fork 9.7k
storage: add new interface to append with CT #15254
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
storage: add new interface to append with CT #15254
Conversation
9698da8
to
1794995
Compare
type AppenderWithCT interface { | ||
Appender | ||
|
||
AppendWithCT(ref SeriesRef, l labels.Labels, t int64, v float64, ct int64) (SeriesRef, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an alternative implementation that doesn't add an interface in #15255 but its uglier IMO. I had another draft that tried to use options to do this but import cycles and other issues made that approach untennable.
This change does the following: - Add an interface to append a sample with CT - Update headAppender and initAppender to implement AppendWithCT - Update the RefSample to include CT - Update the scrape loop to add the CT to samples when CT is enabled This change doesn't update the remote storage wlog watcher to make use of the new CT feild in the RefSample, but that can be done in a following PR. We should compare using benchmarks how this compares to adding the CT to the metadata (which also goes in the WAL) Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>
1794995
to
10c6c0f
Compare
Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>
2efa134
to
154daca
Compare
/prombench main --bench.version=bench/protofirst |
@ridwanmsharif is not a org member nor a collaborator and cannot execute benchmarks. |
@bwplotka mind running the earlier command on the PR :) |
This is not so simple, I got stuck with this scenario development due to metadata bug (now should be fixed, but you need to rebase), sink lack of CT checks (now fixed & released, but I need to update prombench). I need to also think how to test it e.g. we never compared Will try to progress on this today. |
/prombench main --bench.version=bench/cross-feature/ct |
⏱️ Welcome to Prometheus Benchmarking Tool. ⏱️ Compared versions: Custom benchmark version: After the successful deployment (check status here), the benchmarking results can be viewed at: Available Commands:
|
Quickly crafted some scenario description, likely have some bugs.. let's see. |
/prombench restart main --bench.version=bench/cross-feature/ct |
⏱️ Welcome (again) to Prometheus Benchmarking Tool. ⏱️ Compared versions: Custom benchmark version: After successful deployment (check status here), the benchmarking results can be viewed at: Available Commands:
|
/prombench main --bench.version=bench/cross-feature/ct |
⏱️ Welcome to Prometheus Benchmarking Tool. ⏱️ Compared versions: Custom benchmark version: After the successful deployment (check status here), the benchmarking results can be viewed at: Available Commands:
|
Ok, sink does not see any CTs.
Looks like I forgot to enable |
/prombench restart main --bench.version=bench/cross-feature/ct |
⏱️ Welcome (again) to Prometheus Benchmarking Tool. ⏱️ Compared versions: Custom benchmark version: After successful deployment (check status here), the benchmarking results can be viewed at: Available Commands:
|
var ct int64 | ||
var appWithCT storage.AppenderWithCT | ||
var canEncodeCT bool | ||
|
||
if sl.enableCTZeroIngestion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's maybe create another feature flag as ageed.
/prombench cancel |
Benchmark cancel is in progress. |
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com>
Thanks! Superseded with #16046 - as discussed internally. |
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com>
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com>
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com>
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com>
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com>
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com>
Fixes #14218 and #14220 Rebased version of #15254 with improvements. This change does the following: - Change appender interface to be CT aware (optional CT) - Add created-timestamp-per-sample feature flag - Add new sample record used only if CT is appended with the sample. - Remote Write awareness of CT. Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com> Signed-off-by: bwplotka <bwplotka@gmail.com> # Conflicts: # cmd/prometheus/main.go # scrape/helpers_test.go # storage/remote/write_handler_test.go
This change does the following:
This change doesn't update the remote storage wlog watcher to make use of the new CT feild in the RefSample, but that can be done in a following PR.
We should compare using benchmarks how this compares to adding the CT to the metadata (which also goes in the WAL)