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

chore: limit number of top level operations in services list #4666

Merged
merged 3 commits into from
Mar 12, 2024

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Mar 8, 2024

Summary

Part of #4654

This is the schema of the top_level_operations

CREATE TABLE signoz_traces.top_level_operations
(
    `name` LowCardinality(String) CODEC(ZSTD(1)),
    `serviceName` LowCardinality(String) CODEC(ZSTD(1)),
    `time` DateTime DEFAULT now() CODEC(ZSTD(1))
)
ENGINE = ReplacingMergeTree
ORDER BY (serviceName, name)
TTL time + toIntervalMonth(1)
SETTINGS index_granularity = 8192

The table contains the most recent instance of the tuple (serviceName, name). And the time value is now(). We can use the time to discard the old operations that were created before the start time.

This change

  • Discard the old operation
  • Use a maximum of 1500 operations for the IN query (this should be enough?)
  • Send all service ops to the client so we can show them to the user.

Copy link

github-actions bot commented Mar 8, 2024

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added the chore label Mar 8, 2024
@srikanthccv srikanthccv marked this pull request as ready for review March 8, 2024 15:36
@ankitnayan
Copy link
Collaborator

why does frontend need to be aware of the TopLevelOperations? Shouldn't just this be a backend thing?

@srikanthccv
Copy link
Member Author

We considered showing the users some of the selected top-level operations along with the warning text

@ankitnayan ankitnayan self-requested a review March 12, 2024 09:43
@srikanthccv srikanthccv merged commit c6c2b9d into develop Mar 12, 2024
11 checks passed
@srikanthccv srikanthccv deleted the truncate-top-level-ops branch March 12, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants