Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR removes the ChangesRemove distinct value limits
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Comment |
defaultFilterDataLimit cap from filter data queries
Confidence Score: 5/5Safe to merge; the change is a straightforward removal of a hard cap with no logic regressions on the critical query paths. The removal of the 500-row limit is mechanical and well-scoped. The only behavioral gap introduced is a sort-order inconsistency on the key-pairs path between the matview and raw-table routes, which affects presentation order in the UI but not correctness of the data returned. framework/logstore/rdb.go — the raw-table fallback for GetDistinctKeyPairs is missing the Order clause added to its matview counterpart. Important Files Changed
Reviews (2): Last reviewed commit: "fix: remove the 500 distinct values cap ..." | Re-trigger Greptile |
…ies to avoid confusion when data is missing
5b2de1c to
d7383b9
Compare
Merge activity
|
) ## Summary Removes the `defaultFilterDataLimit` (500) cap that was previously applied to all `GetDistinct*` and `GetAvailable*` filter-data queries. This ensures that filter dropdowns and autocomplete fields return the full set of distinct values rather than silently truncating results at 500 entries. ## Changes - Removed the `defaultFilterDataLimit = 500` constant and all `.Limit(defaultFilterDataLimit)` calls from both the materialized view query paths (`matviews.go`) and the direct RDB query paths (`rdb.go`). - Affected queries: distinct models, aliases, stop reasons, routing engines, key pairs, tool names, server labels, and MCP virtual keys. - The existing `defaultFilterDataCutoffDays = 30` time-based filter remains in place to keep queries scoped to recent data. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Verify that filter endpoints return more than 500 distinct values when the dataset contains them, and that no results are truncated. ```sh go test ./framework/logstore/... ``` Seed a test database with more than 500 distinct models (or aliases, etc.) within the 30-day window and confirm all values are returned by the corresponding `GetDistinct*` method. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations Removing the result cap means larger payloads may be returned by filter-data endpoints. Ensure that the 30-day cutoff and existing authentication/authorization controls are sufficient to prevent abuse or excessive memory usage in environments with very high cardinality data. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
…ximhq#3561) ## Summary Removes the `defaultFilterDataLimit` (500) cap that was previously applied to all `GetDistinct*` and `GetAvailable*` filter-data queries. This ensures that filter dropdowns and autocomplete fields return the full set of distinct values rather than silently truncating results at 500 entries. ## Changes - Removed the `defaultFilterDataLimit = 500` constant and all `.Limit(defaultFilterDataLimit)` calls from both the materialized view query paths (`matviews.go`) and the direct RDB query paths (`rdb.go`). - Affected queries: distinct models, aliases, stop reasons, routing engines, key pairs, tool names, server labels, and MCP virtual keys. - The existing `defaultFilterDataCutoffDays = 30` time-based filter remains in place to keep queries scoped to recent data. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Verify that filter endpoints return more than 500 distinct values when the dataset contains them, and that no results are truncated. ```sh go test ./framework/logstore/... ``` Seed a test database with more than 500 distinct models (or aliases, etc.) within the 30-day window and confirm all values are returned by the corresponding `GetDistinct*` method. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations Removing the result cap means larger payloads may be returned by filter-data endpoints. Ensure that the 30-day cutoff and existing authentication/authorization controls are sufficient to prevent abuse or excessive memory usage in environments with very high cardinality data. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
…ximhq#3561) ## Summary Removes the `defaultFilterDataLimit` (500) cap that was previously applied to all `GetDistinct*` and `GetAvailable*` filter-data queries. This ensures that filter dropdowns and autocomplete fields return the full set of distinct values rather than silently truncating results at 500 entries. ## Changes - Removed the `defaultFilterDataLimit = 500` constant and all `.Limit(defaultFilterDataLimit)` calls from both the materialized view query paths (`matviews.go`) and the direct RDB query paths (`rdb.go`). - Affected queries: distinct models, aliases, stop reasons, routing engines, key pairs, tool names, server labels, and MCP virtual keys. - The existing `defaultFilterDataCutoffDays = 30` time-based filter remains in place to keep queries scoped to recent data. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Verify that filter endpoints return more than 500 distinct values when the dataset contains them, and that no results are truncated. ```sh go test ./framework/logstore/... ``` Seed a test database with more than 500 distinct models (or aliases, etc.) within the 30-day window and confirm all values are returned by the corresponding `GetDistinct*` method. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations Removing the result cap means larger payloads may be returned by filter-data endpoints. Ensure that the 30-day cutoff and existing authentication/authorization controls are sufficient to prevent abuse or excessive memory usage in environments with very high cardinality data. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Removes the
defaultFilterDataLimit(500) cap that was previously applied to allGetDistinct*andGetAvailable*filter-data queries. This ensures that filter dropdowns and autocomplete fields return the full set of distinct values rather than silently truncating results at 500 entries.Changes
defaultFilterDataLimit = 500constant and all.Limit(defaultFilterDataLimit)calls from both the materialized view query paths (matviews.go) and the direct RDB query paths (rdb.go).defaultFilterDataCutoffDays = 30time-based filter remains in place to keep queries scoped to recent data.Type of change
Affected areas
How to test
Verify that filter endpoints return more than 500 distinct values when the dataset contains them, and that no results are truncated.
go test ./framework/logstore/...Seed a test database with more than 500 distinct models (or aliases, etc.) within the 30-day window and confirm all values are returned by the corresponding
GetDistinct*method.Breaking changes
Related issues
Security considerations
Removing the result cap means larger payloads may be returned by filter-data endpoints. Ensure that the 30-day cutoff and existing authentication/authorization controls are sufficient to prevent abuse or excessive memory usage in environments with very high cardinality data.
Checklist
docs/contributing/README.mdand followed the guidelines