goto / compass

Metadata storage service
https://goto.github.io/compass/
Apache License 2.0
2 stars 0 forks source link

feat: Optimize delete asset memory usage #85

Closed sumslim closed 1 week ago

sumslim commented 1 week ago

As part of issue: https://github.com/goto/compass/issues/81 Optimizing memory usage for cancelFn is delete asset from ES using Cancel function within the context timeout: After the specified timeout, the context for the task automatically expires, and the cancellation function is invoked.

sumslim commented 1 week ago

Test case failing due to race condition detected, possibly due to an edge case: We need to ensure that no operation modifies cancelFnList between appending a cancel function and calling removeCancelFnByIndex. Might need to use mutex to synchronize access to the cancelFnList, but this might bring contention overhead Using sync.Map as an alternative as it is supposed to provide better performance under high contention cc @haveiss @irainia

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 11070490716

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
core/asset/service.go 10 14 71.43%
<!-- Total: 10 14 71.43% -->
Totals Coverage Status
Change from base Build 10676380823: -0.04%
Covered Lines: 6911
Relevant Lines: 8216

💛 - Coveralls