]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
journal: fix flush by age and in-flight byte tracking
authorJason Dillaman <dillaman@redhat.com>
Tue, 5 Nov 2019 01:12:00 +0000 (20:12 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 19 Nov 2019 13:45:46 +0000 (08:45 -0500)
commite536b5c8e10e152ef07fc5ee5bb019cea359d249
tree4516340c37735f90c21d2d11c9cdaf38d55828be
parent5a5b5c58015307f686d42823ec961f7ca41e763e
journal: fix flush by age and in-flight byte tracking

The flush by age was always causing an immediate flush due to a
backwards comparison. Additionally, the in-flight byte tracker was
never decremented which caused premature closure of the journal
object.

Finally, there was a potential race condition between closing the
object and in-flight notification callbacks executing. Now we keep
the lock held for both closed and overflow callbacks to prevent
the small chance of a race.

Fixes: https://tracker.ceph.com/issues/42598
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/journal/ObjectRecorder.cc
src/journal/ObjectRecorder.h
src/test/journal/test_ObjectRecorder.cc