Changeset View
Changeset View
Standalone View
Standalone View
src/engine/writetransaction.cpp
Show First 20 Lines • Show All 259 Lines • ▼ Show 20 Line(s) | 250 | { | |||
---|---|---|---|---|---|
260 | return addTerms(id, terms); | 260 | return addTerms(id, terms); | ||
261 | } | 261 | } | ||
262 | 262 | | |||
263 | void WriteTransaction::commit() | 263 | void WriteTransaction::commit() | ||
264 | { | 264 | { | ||
265 | PostingDB postingDB(m_dbis.postingDbi, m_txn); | 265 | PostingDB postingDB(m_dbis.postingDbi, m_txn); | ||
266 | PositionDB positionDB(m_dbis.positionDBi, m_txn); | 266 | PositionDB positionDB(m_dbis.positionDBi, m_txn); | ||
267 | 267 | | |||
268 | int operationCount = m_pendingOperations.size(); | ||||
269 | if (operationCount > 1000000) | ||||
270 | { | ||||
271 | qWarning() << "WriteTransaction->commit(): suspiciously large transaction, operationCount=" << operationCount; | ||||
272 | } | ||||
273 | | ||||
268 | QHashIterator<QByteArray, QVector<Operation> > iter(m_pendingOperations); | 274 | QHashIterator<QByteArray, QVector<Operation> > iter(m_pendingOperations); | ||
269 | while (iter.hasNext()) { | 275 | while (iter.hasNext()) { | ||
270 | iter.next(); | 276 | iter.next(); | ||
271 | 277 | | |||
272 | const QByteArray& term = iter.key(); | 278 | const QByteArray& term = iter.key(); | ||
273 | const QVector<Operation> operations = iter.value(); | 279 | const QVector<Operation> operations = iter.value(); | ||
274 | 280 | | |||
275 | PostingList list = postingDB.get(term); | 281 | PostingList list = postingDB.get(term); | ||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |