backport.patch
omindex.cc | ||
---|---|---|
1502 | 1502 |
// + 1 so that old_lastdocid is a valid subscript. |
1503 | 1503 |
updated.resize(old_lastdocid + 1); |
1504 | 1504 |
} |
1505 |
try { |
|
1506 |
string ubound = db.get_value_upper_bound(VALUE_LASTMOD); |
|
1507 |
if (!ubound.empty()) |
|
1508 |
last_mod_max = binary_string_to_int(ubound); |
|
1509 |
} catch (const Xapian::UnimplementedError &) { |
|
1510 | 1505 |
numeric_limits<time_t> n; |
1511 | 1506 |
last_mod_max = n.max(); |
1512 |
} |
|
1513 | 1507 |
} else { |
1514 | 1508 |
db = Xapian::WritableDatabase(dbpath, Xapian::DB_CREATE_OR_OVERWRITE); |
1515 | 1509 |
} |
... | ... | |
1543 | 1537 |
} |
1544 | 1538 |
} while (++did < updated.size()); |
1545 | 1539 |
} |
1546 |
db.commit();
|
|
1540 |
db.flush();
|
|
1547 | 1541 |
exitcode = 0; |
1548 | 1542 |
} catch (const Xapian::Error &e) { |
1549 | 1543 |
cout << "Exception: " << e.get_description() << endl; |
scriptindex.cc | ||
---|---|---|
604 | 604 |
// Hmm, what happened? |
605 | 605 |
cout << "Caught exception in UNIQUE!" << endl; |
606 | 606 |
cout << "E: " << e.get_description() << endl; |
607 |
database.commit();
|
|
607 |
database.flush();
|
|
608 | 608 |
goto again; |
609 | 609 |
} |
610 | 610 |
break; |
... | ... | |
707 | 707 |
// Commit after each file to make sure all changes from that file make it |
708 | 708 |
// in. |
709 | 709 |
if (verbose) cout << "Committing: " << endl; |
710 |
database.commit();
|
|
710 |
database.flush();
|
|
711 | 711 | |
712 | 712 |
return true; |
713 | 713 |
} |