Repository navigation
control merge mem - #22682
control merge mem#22682
Conversation
|
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here. PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
|
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here. PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
- refresh rss when checking available memory in merge scheduling - better memory cost estimation Approved by: @XuPeng-SH, @zhangxu19830126
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #22638
What this PR does / why we need it:
PR Type
Enhancement, Bug fix
Description
Add specialized merge memory throttling with RSS refresh debouncing
Improve merge memory cost estimation calculation
Replace unsafe string access with safe vector methods
Refactor merge scheduler memory management configuration
Diagram Walkthrough
File Walkthrough
resource_throttler.go
Add merge-specialized memory throttling with debounced RSS refreshpkg/common/rscthrottler/resource_throttler.go
mergeAvailDebouncefield for debouncing RSS refresh in merge modespecializedForMergeoption to enable merge-specific memorytracking
Available()logic that refreshes RSS everysecond when in merge mode
max()function for cleaner codeWithSpecializedForMerge()option functionscheduler.go
Configure merge scheduler with specialized throttlerpkg/vm/engine/tae/db/merge/scheduler.go
WithAllowOutOfLimitAcquire()withWithSpecializedForMerge()option
PrintUsage()call from heartbeat handlerRefresh()call for memory state updatestask.go
Improve merge memory cost estimation marginpkg/vm/engine/tae/mergesort/task.go
totalSize / 3 * 2tototalSize / 2 * 3service_txn_event.go
Replace unsafe string access with safe methodspkg/txn/trace/service_txn_event.go
UnsafeGetStringAt()withGetStringAt()for safer vector access