]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fix POSIX LockFile after failure to create file (#8747)
authorPeter Dillinger <peterd@fb.com>
Wed, 8 Sep 2021 05:40:37 +0000 (22:40 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 8 Sep 2021 05:41:36 +0000 (22:41 -0700)
commite40b04e9fa34b0846eab2592127273c4d5c96b37
treee5e859d0154b9177ef7794f2db0508e979355f75
parentcb5b851ff8cd2d3b2e8d15c449cd015d87e73bee
Fix POSIX LockFile after failure to create file (#8747)

Summary:
Failure to create the lock file (e.g. out of space) could
prevent future LockFile attempts in the same process on the same file
from succeeding.

Also added DEBUG code to fail assertion if PosixFileLock is destroyed
without using UnlockFile (which is a risk because FileLock is in the
public API with virtual destructor).

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8747

Test Plan: test added

Reviewed By: ajkr

Differential Revision: D30732543

Pulled By: pdillinger

fbshipit-source-id: 4c30a959566d91f778d6fad3fbbd5f3941b097c1
HISTORY.md
env/env_test.cc
env/fs_posix.cc
include/rocksdb/env.h