]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
journal: do not flag append as full if already known to be full
authorJason Dillaman <dillaman@redhat.com>
Fri, 13 May 2016 20:34:44 +0000 (16:34 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 18 May 2016 15:02:29 +0000 (11:02 -0400)
Once an object has overflowed or a close is in-progress, re-attempting
to close the object is not needed since the async process is already
underway.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/journal/ObjectRecorder.cc

index f7f1966224b9734934fc63fa259ce60dacab7180..78b51a2b4d1ccbe90ebd1a5a479dc53807ed2dba 100644 (file)
@@ -69,7 +69,8 @@ bool ObjectRecorder::append(const AppendBuffers &append_buffers) {
   } else {
     cancel_append_task();
   }
-  return (m_size + m_pending_bytes >= m_soft_max_size);
+  return (!m_object_closed && !m_overflowed &&
+          m_size + m_pending_bytes >= m_soft_max_size);
 }
 
 void ObjectRecorder::flush(Context *on_safe) {