Switch to unified view

a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp
...
...
1668
    Chrono chron;
1668
    Chrono chron;
1669
    m_ndb->m_wqueue.waitIdle();
1669
    m_ndb->m_wqueue.waitIdle();
1670
    // We flush here just for correct measurement of the thread work time
1670
    // We flush here just for correct measurement of the thread work time
1671
    string ermsg;
1671
    string ermsg;
1672
    try {
1672
    try {
1673
        m_ndb->xwdb.flush();
1673
        m_ndb->xwdb.commit();
1674
    } XCATCHERROR(ermsg);
1674
    } XCATCHERROR(ermsg);
1675
    if (!ermsg.empty()) {
1675
    if (!ermsg.empty()) {
1676
        LOGERR("Db::waitUpdIdle: flush() failed: "  << (ermsg) << "\n" );
1676
        LOGERR("Db::waitUpdIdle: flush() failed: "  << (ermsg) << "\n" );
1677
    }
1677
    }
1678
    m_ndb->m_totalworkns += chron.nanos();
1678
    m_ndb->m_totalworkns += chron.nanos();
...
...
1700
    LOGERR("Db::doFLush: no ndb??\n" );
1700
    LOGERR("Db::doFLush: no ndb??\n" );
1701
    return false;
1701
    return false;
1702
    }
1702
    }
1703
    string ermsg;
1703
    string ermsg;
1704
    try {
1704
    try {
1705
    m_ndb->xwdb.flush();
1705
    m_ndb->xwdb.commit();
1706
    } XCATCHERROR(ermsg);
1706
    } XCATCHERROR(ermsg);
1707
    if (!ermsg.empty()) {
1707
    if (!ermsg.empty()) {
1708
    LOGERR("Db::doFlush: flush() failed: "  << (ermsg) << "\n" );
1708
    LOGERR("Db::doFlush: flush() failed: "  << (ermsg) << "\n" );
1709
    return false;
1709
    return false;
1710
    }
1710
    }
...
...
1905
    // pending update. This could lose both previous added documents
1905
    // pending update. This could lose both previous added documents
1906
    // or deletions. Adding the flush before the delete pass ensured
1906
    // or deletions. Adding the flush before the delete pass ensured
1907
    // that any added document would go to the index. Kept here
1907
    // that any added document would go to the index. Kept here
1908
    // because it doesn't really hurt.
1908
    // because it doesn't really hurt.
1909
    try {
1909
    try {
1910
    m_ndb->xwdb.flush();
1910
    m_ndb->xwdb.commit();
1911
    } catch (...) {
1911
    } catch (...) {
1912
    LOGERR("Db::purge: 1st flush failed\n" );
1912
    LOGERR("Db::purge: 1st flush failed\n" );
1913
1913
1914
    }
1914
    }
1915
1915
...
...
1950
        purgecount++;
1950
        purgecount++;
1951
    }
1951
    }
1952
    }
1952
    }
1953
1953
1954
    try {
1954
    try {
1955
    m_ndb->xwdb.flush();
1955
    m_ndb->xwdb.commit();
1956
    } catch (...) {
1956
    } catch (...) {
1957
    LOGERR("Db::purge: 2nd flush failed\n" );
1957
    LOGERR("Db::purge: 2nd flush failed\n" );
1958
    }
1958
    }
1959
    return true;
1959
    return true;
1960
}
1960
}