Nir Soffer has uploaded a new change for review.

Change subject: mailbox: Remove fatal, uneeded, and racy check
......................................................................

mailbox: Remove fatal, uneeded, and racy check

After errors in _checkForMail, the error handling code check if the
_inLock is locked and release it. This check is pointless as
_checkForMail use try finally block to acquire and release this lock.
There is no chance that this lock will not be released when returning
from _checkForMail.

This check cause the mailbox thread to exit when using pthreading 1.3,
which reveal the fact that the locked() method was never implemented by
pthreading.

Change-Id: I46af1988a88a8aab3d9835034d68d25eec7d075d
Signed-off-by: Nir Soffer <nsof...@redhat.com>
---
M vdsm/storage/storage_mailbox.py
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/29854/1

diff --git a/vdsm/storage/storage_mailbox.py b/vdsm/storage/storage_mailbox.py
index c31018a..0a8c22e 100644
--- a/vdsm/storage/storage_mailbox.py
+++ b/vdsm/storage/storage_mailbox.py
@@ -784,8 +784,6 @@
                 try:
                     self._checkForMail()
                 except:
-                    if (self._inLock.locked()):
-                        self._inLock.release()
                     self.log.error("Error checking for mail", exc_info=True)
                 time.sleep(self._monitorInterval)
         finally:


-- 
To view, visit http://gerrit.ovirt.org/29854
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46af1988a88a8aab3d9835034d68d25eec7d075d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to