etcd-io / etcd

Distributed reliable key-value store for the most critical data of a distributed system
https://etcd.io
Apache License 2.0
47.92k stars 9.78k forks source link

make sure temp file(s) are closed during defrag #18841

Closed ghouscht closed 2 weeks ago

ghouscht commented 2 weeks ago

Bug report criteria

What happened?

Some temp file(s) (https://github.com/etcd-io/etcd/blob/bd8896364a1d9adb554b538232004e5b2d6c850a/server/storage/backend/backend.go#L487) might not be closed during defrag. See discussion https://github.com/etcd-io/etcd/pull/18822#discussion_r1830692111 for more details.

ghouscht commented 2 weeks ago

/assign

Will take care of this.

ghouscht commented 2 weeks ago

Apparently if everything works as expected the temp file is closed:

Probably in one of the error cases this doesn't happen. Need to check.

ghouscht commented 2 weeks ago

This is done. All PRs, including the ones for the backports to 3.4 and 3.5 have been merged.