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

[Bug]: memoryLeak in DataNode's rendezvousFlushManager #33110

Open
1 task done
czs007 opened this issue May 17, 2024 · 0 comments
Open
1 task done

[Bug]: memoryLeak in DataNode's rendezvousFlushManager #33110

czs007 opened this issue May 17, 2024 · 0 comments
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@czs007
Copy link
Contributor

czs007 commented May 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: 2.3.X
- Deployment mode(standalone or cluster): both
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

// rendezvousFlushManager makes sure insert & del buf all flushed
type rendezvousFlushManager struct {
	allocator.Allocator
	storage.ChunkManager
	Channel

	// segment id => flush queue
	dispatcher *typeutil.ConcurrentMap[int64, *orderFlushQueue]
	notifyFunc notifyMetaFunc

	dropping    atomic.Bool
	dropHandler dropHandler
	ctx         context.Context
	cancel      context.CancelFunc
	cleanLock   sync.RWMutex
	wg          sync.WaitGroup
	cleanInternal	time.Duration
}

🔃️ 上下文的话题
The dispatcher in the aforementioned data structure lacks the logic to reclaim its key, which can lead to memory leaks.

image

Expected Behavior

Incorporate a timed logic to attempt the cleanup of these segment IDs in dispacher.

Steps To Reproduce

As data is written or deleted, any occurrence of a new segment ID will result in a leak.

Milvus Log

No response

Anything else?

No response

@czs007 czs007 added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 17, 2024
@czs007 czs007 self-assigned this May 17, 2024
@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 20, 2024
sre-ci-robot pushed a commit that referenced this issue May 20, 2024
issue: #33110

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants