Commit e0296439 authored by Vincent Pelletier's avatar Vincent Pelletier

Remove unused parameter.

Store does not handle conflicts (for reliability, it can only be done once
all store responses are received), so this parameter must go away.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1859 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6b5e0210
......@@ -69,8 +69,7 @@ class Storage(BaseStorage.BaseStorage,
@check_read_only
def store(self, oid, serial, data, version, transaction):
return self.app.store(oid=oid, serial=serial,
data=data, version=version, transaction=transaction,
tryToResolveConflict=self.tryToResolveConflict)
data=data, version=version, transaction=transaction)
def getSerial(self, oid):
try:
......
......@@ -544,8 +544,7 @@ class Application(object):
self.local_var.txn = transaction
def store(self, oid, serial, data, version, transaction,
tryToResolveConflict):
def store(self, oid, serial, data, version, transaction):
"""Store object."""
if transaction is not self.local_var.txn:
raise StorageTransactionError(self, transaction)
......@@ -608,7 +607,7 @@ class Application(object):
del local_var.conflict_serial_dict[oid]
# Try to store again
self.store(oid, conflict_serial, new_data, version,
local_var.txn, tryToResolveConflict)
local_var.txn)
append(oid)
resolved = True
if not resolved:
......@@ -820,8 +819,7 @@ class Application(object):
# Third do transaction with old data
for oid, data in data_dict.iteritems():
self.store(oid, transaction_id, data, None, txn,
tryToResolveConflict)
self.store(oid, transaction_id, data, None, txn)
self.waitStoreResponses(tryToResolveConflict)
return self.local_var.tid, oid_list
......
......@@ -412,7 +412,7 @@ class ClientApplicationTests(NeoTestBase):
app.local_var.txn = old_txn = object()
self.assertTrue(app.local_var.txn is not txn)
self.assertRaises(StorageTransactionError, app.store, oid, tid, '',
None, txn, resolving_tryToResolveConflict)
None, txn)
self.assertEquals(app.local_var.txn, old_txn)
# check partition_id and an empty cell list -> NEOStorageError
app.local_var.txn = txn
......@@ -420,7 +420,7 @@ class ClientApplicationTests(NeoTestBase):
app.pt = Mock({ 'getCellListForOID': (), })
app.num_partitions = 2
self.assertRaises(NEOStorageError, app.store, oid, tid, '', None,
txn, resolving_tryToResolveConflict)
txn)
calls = app.pt.mockGetNamedCalls('getCellListForOID')
self.assertEquals(len(calls), 1)
self.assertEquals(calls[0].getParam(0), oid) # oid=11
......@@ -453,7 +453,7 @@ class ClientApplicationTests(NeoTestBase):
app.nm.createStorage(address=storage_address)
app.local_var.object_stored = (oid, tid)
app.local_var.data_dict[oid] = 'BEFORE'
app.store(oid, tid, '', None, txn, failing_tryToResolveConflict)
app.store(oid, tid, '', None, txn)
app.local_var.queue.put((conn, packet))
self.assertRaises(ConflictError, app.waitStoreResponses,
failing_tryToResolveConflict)
......@@ -488,7 +488,7 @@ class ClientApplicationTests(NeoTestBase):
return not queue.empty()
app.dispatcher = Dispatcher()
app.nm.createStorage(address=storage_address)
app.store(oid, tid, 'DATA', None, txn, resolving_tryToResolveConflict)
app.store(oid, tid, 'DATA', None, txn)
self.checkAskStoreObject(conn)
app.local_var.queue.put((conn, packet))
app.waitStoreResponses(resolving_tryToResolveConflict)
......
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