Commit 3bf2a0c6 authored by Julien Muchembled's avatar Julien Muchembled

bug: on exist/crash, storage space for non-voted data may be leaked

Commit 58d0b602 didn't fix the issue completely.
Storage space can be freed with --repair option.

This adds an expectedFailure test.
parent 34d797e2
......@@ -247,6 +247,25 @@ class Test(NEOThreadedTest):
data_info[key] -= 1
self.assertEqual(data_info, cluster.storage.getDataLockInfo())
@with_cluster()
def testStorageDataLock2(self, cluster):
storage = cluster.getZODBStorage()
def t(data):
oid = storage.new_oid()
txn = transaction.Transaction()
storage.tpc_begin(txn)
storage.store(oid, None, data, '', txn)
return txn
t1 = t('foo')
storage.tpc_finish(t('bar'))
s = cluster.storage
s.stop()
cluster.join((s,))
s.resetNode()
storage.app.max_reconnection_to_master = 0
self.assertRaises(NEOPrimaryMasterLost, storage.tpc_vote, t1)
expectedFailure(self.assertFalse)(s.dm.getOrphanList())
@with_cluster(storage_count=1)
def testDelayedUnlockInformation(self, cluster):
except_list = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment