-
Notifications
You must be signed in to change notification settings - Fork 715
fix: rollback scc #9441
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
fix: rollback scc #9441
Conversation
|
Failed to generate code suggestions for PR |
Greptile OverviewGreptile SummaryThis PR rolls back the use of the Key changes:
The rollback simplifies the concurrency model by using well-established locking primitives instead of the lock-free Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client as Search Client
participant Flight as Flight Handler
participant WAL as WAL Module
participant Files as File System
participant Locker as SearchingFileLocker
Client->>Flight: Search Request (trace_id)
Flight->>WAL: get_file_list()
WAL->>Files: List WAL files
Files-->>WAL: file_keys[]
WAL->>Locker: lock_files(file_keys)
Note over Locker: Acquires write lock<br/>Increments counter for each file
Locker-->>WAL: Files locked
WAL->>WAL: lock_request(trace_id, file_keys)
Note over WAL: Stores trace_id -> files mapping<br/>for cleanup on request completion
WAL-->>Flight: locked_files[]
Flight->>Flight: Process search query
alt Search Completes Successfully
Flight->>WAL: release_request(trace_id)
WAL->>WAL: Remove trace_id mapping
WAL->>Locker: release_files(file_keys)
Note over Locker: Acquires write lock<br/>Decrements counter for each file<br/>Removes entry if counter reaches 0
else Search Fails or Filtered Out
Flight->>WAL: release_files(specific_file)
WAL->>Locker: release_files([file])
Note over Locker: Decrements counter<br/>Removes if counter = 0
end
Note over Locker: Files with counter > 0<br/>are protected from deletion<br/>by ingester cleanup jobs
|
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.
14 files reviewed, no comments
fixed #9419