Skip to content

Conversation

SungJin1212
Copy link
Member

This PR adds a -ingester.enable-ooo-native-histograms flag to enable out-of-order native histogram ingestion per tenant.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@SungJin1212 SungJin1212 force-pushed the Add-ingester.enable-ooo-native-histograms branch 3 times, most recently from 3aeaf64 to 063ce02 Compare March 4, 2025 09:06
@SungJin1212 SungJin1212 requested a review from yeya24 March 4, 2025 09:34
@SungJin1212 SungJin1212 force-pushed the Add-ingester.enable-ooo-native-histograms branch from 063ce02 to d596fc5 Compare March 5, 2025 00:53
- `-blocks-storage.tsdb.out-of-order-cap-max` (int) CLI flag
- `-ingester.out-of-order-time-window` (duration) CLI flag
- `out_of_order_time_window` (duration) field in runtime config file
- `-ingester.enable-ooo-native-histograms` (bool) field in runtime config file
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit. -ingester.enable-ooo-native-histograms is a flag instead of a config

EnableMemorySnapshotOnShutdown: i.cfg.BlocksStorageConfig.TSDB.MemorySnapshotOnShutdown,
OutOfOrderTimeWindow: time.Duration(oooTimeWindow).Milliseconds(),
OutOfOrderCapMax: i.cfg.BlocksStorageConfig.TSDB.OutOfOrderCapMax,
EnableOOONativeHistograms: i.limits.EnableOOONativeHistograms(userID),
Copy link
Contributor

@yeya24 yeya24 Mar 5, 2025

Choose a reason for hiding this comment

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

We should add hot reload because a user can enable or disable ooo native histogram during runtime.

But EnableOOONativeHistograms config is only specified once when creating the TSDB? So I wonder if it makes sense to make EnableOOONativeHistograms an runtime config as there is nothing can be changed during runtime

Copy link
Member Author

@SungJin1212 SungJin1212 Mar 6, 2025

Choose a reason for hiding this comment

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

Yeah, the reloader is necessary to change those configs at runtime.
I intended to configure EnableOOONativeHistograms as per tenant, just like OutOfOrderTimeWindow.

Copy link
Contributor

@yeya24 yeya24 Mar 6, 2025

Choose a reason for hiding this comment

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

out of order time window is a hot reloadable config.

I guess it is probably the same reason why we didn't make enable native histogram a runtime config.

Copy link
Member Author

Choose a reason for hiding this comment

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

Shall we go with the global config for now?

@SungJin1212 SungJin1212 force-pushed the Add-ingester.enable-ooo-native-histograms branch from d596fc5 to 27ca75a Compare March 6, 2025 02:46
@SungJin1212 SungJin1212 force-pushed the Add-ingester.enable-ooo-native-histograms branch from 27ca75a to 29eaff6 Compare March 7, 2025 04:40
@SungJin1212 SungJin1212 mentioned this pull request Mar 7, 2025
1 task
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks!

@yeya24 yeya24 merged commit 69e6a28 into cortexproject:master Mar 7, 2025
17 checks passed
@yeya24
Copy link
Contributor

yeya24 commented Mar 13, 2025

I am wondering if we should remove the flag as Prometheus is planning to mark it as stable. prometheus/prometheus#16207

@SungJin1212
Copy link
Member Author

@yeya24
Yeah, should we remove the flag now?

@SungJin1212
Copy link
Member Author

@yeya24
I think it's fine to remove it if the Prometheus remove it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants