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

Elastic searchのbulk indexerのメモリリーク修正 #2190

Merged
merged 4 commits into from
Jan 13, 2024

Conversation

ikura-hamu
Copy link
Member

fix: #2172
関数に切り出して、deferでindexerをCloseするようにした。

motoki317
motoki317 previously approved these changes Jan 12, 2024
Copy link
Member

@motoki317 motoki317 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

テストはあまり書かれていない箇所ですが、動作確認(新規作成、更新、削除それぞれのパスを実行させてみる)は取れていますか?

そうならば、リークの動作は本番以外ではなかなか再現難しいと思うので、早めにリリースして様子を見るのが良いと思います

service/search/es_sync.go Outdated Show resolved Hide resolved
@ikura-hamu ikura-hamu closed this Jan 12, 2024
@ikura-hamu ikura-hamu reopened this Jan 12, 2024
@ikura-hamu
Copy link
Member Author

まちがってcloseしちゃった。
手元の動作確認はして、追加、編集、削除ができてることは確認しました。

motoki317
motoki317 previously approved these changes Jan 12, 2024
Copy link
Member

@logica0419 logica0419 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとう!だいぶ理想的な解決方法になっていると思います。ありがたい。
いくつか指摘したので、確認の方お願いします

service/search/es_sync.go Outdated Show resolved Hide resolved
service/search/es_sync.go Outdated Show resolved Hide resolved
service/search/es_sync.go Outdated Show resolved Hide resolved
service/search/es_sync.go Outdated Show resolved Hide resolved
Copy link
Member

@logica0419 logica0419 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとう!完璧です!
これで治れば良いな…

@ikura-hamu
Copy link
Member Author

マージしていいですか?

@logica0419
Copy link
Member

いいよ

@ikura-hamu ikura-hamu merged commit 13fc698 into master Jan 13, 2024
5 checks passed
@ikura-hamu ikura-hamu deleted the fix/es_mamory branch January 13, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

elasticsearch周りでメモリリークしている
3 participants