vdaas / vald

Vald. A Highly Scalable Distributed Vector Search Engine
https://vald.vdaas.org
Apache License 2.0
1.53k stars 78 forks source link

[Potential bug] Share instance in defaultOps #558

Open kevindiu opened 4 years ago

kevindiu commented 4 years ago

Describe the bug:

It have been found the same bug in 2 different package (tls and cache) so just in case I create a bug report for it. Using defaultOps as var in option.go may create potential bugs in the program as it share the same instance to all callers.

I suggest to change all the implementation of defaultOps to from var to func()? (like this commit) https://github.com/vdaas/vald/pull/485/commits/db434cbb2af37ef3253a84c7283729c3e263a024

To Reproduce:

Expected behavior:

Environment:

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label type/bug to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

kpango commented 2 years ago

@kevindiu Could you please Investigate this Issue??