Commit a414f91f authored by Julien Muchembled's avatar Julien Muchembled

Preserve 'packed' flag on import/iteration

parent 5abfa5fd
...@@ -790,7 +790,6 @@ class Application(ThreadedApplication): ...@@ -790,7 +790,6 @@ class Application(ThreadedApplication):
txn_info[k] = v txn_info[k] = v
def _getTransactionInformation(self, tid): def _getTransactionInformation(self, tid):
packet = Packets.AskTransactionInformation(tid)
return self._askStorageForRead(tid, return self._askStorageForRead(tid,
Packets.AskTransactionInformation(tid)) Packets.AskTransactionInformation(tid))
......
...@@ -35,7 +35,8 @@ class Transaction(BaseStorage.TransactionRecord): ...@@ -35,7 +35,8 @@ class Transaction(BaseStorage.TransactionRecord):
""" Transaction object yielded by the NEO iterator """ """ Transaction object yielded by the NEO iterator """
def __init__(self, app, txn): def __init__(self, app, txn):
super(Transaction, self).__init__(txn['id'], ' ', super(Transaction, self).__init__(txn['id'],
'p' if txn['packed'] else ' ',
txn['user_name'], txn['description'], txn['ext']) txn['user_name'], txn['description'], txn['ext'])
self.app = app self.app = app
self.oid_list = txn['oids'] self.oid_list = txn['oids']
......
...@@ -365,7 +365,9 @@ class ImporterDatabaseManager(DatabaseManager): ...@@ -365,7 +365,9 @@ class ImporterDatabaseManager(DatabaseManager):
self.storeTransaction(tid, object_list, ( self.storeTransaction(tid, object_list, (
(x[0] for x in object_list), (x[0] for x in object_list),
str(txn.user), str(txn.description), str(txn.user), str(txn.description),
cPickle.dumps(txn.extension), False, tid), False) cPickle.dumps(txn.extension),
txn.status == 'p', tid),
False)
self.releaseData(data_id_list) self.releaseData(data_id_list)
logging.debug("TXN %s imported (user=%r, desc=%r, len(oid)=%s)", logging.debug("TXN %s imported (user=%r, desc=%r, len(oid)=%s)",
util.dump(tid), txn.user, txn.description, len(object_list)) util.dump(tid), txn.user, txn.description, len(object_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