1
0
Fork 0

calculate hash outside of lock

This commit is contained in:
Jan Steemann 2014-06-05 01:12:11 +02:00
parent d18264b1a6
commit ed37f50b8e
1 changed files with 3 additions and 1 deletions

View File

@ -1018,6 +1018,8 @@ static int InsertDocumentShapedJson (TRI_transaction_collection_t* trxCollection
keyString = key;
}
uint64_t hash = TRI_FnvHashPointer(keyString.c_str(), keyString.size());
// construct a legend for the shaped json
triagens::basics::JsonLegend legend(document->_shaper);
int res = legend.addShape(shaped->_sid, &shaped->_data);
@ -1079,7 +1081,7 @@ static int InsertDocumentShapedJson (TRI_transaction_collection_t* trxCollection
void* mem = operation.marker->mem();
header->_rid = rid;
header->_dataptr = mem; // PROTECTED by trx in trxCollection
header->_hash = TRI_FnvHashString(keyString.c_str());
header->_hash = hash;
// insert into indexes
res = InsertDocument(trxCollection, header, operation, mptr, forceSync);