update for new DB layout

This commit is contained in:
Doug Hoyte
2024-08-31 00:47:38 -04:00
parent fc43a2260b
commit 9a7128e102
3 changed files with 6 additions and 4 deletions

View File

@ -76,7 +76,8 @@ void cmd_sync(const std::vector<std::string> &subArgs) {
for (auto levId : levIds) {
auto ev = lookupEventByLevId(txn, levId);
storageVector.insert(packed.created_at(), packed.id().substr(0, ne.idSize));
PackedEventView packed(ev.buf);
storageVector.insert(packed.created_at(), packed.id());
}
LI << "Filter matches " << numEvents << " events";

View File

@ -161,7 +161,8 @@ void RelayServer::runNegentropy(ThreadPool<MsgNegentropy>::Thread &thr) {
for (auto levId : view->levIds) {
try {
auto ev = lookupEventByLevId(txn, levId);
view->storageVector.insert(packed.created_at(), packed.id().substr(0, view->ne.idSize));
PackedEventView packed(ev.buf);
view->storageVector.insert(packed.created_at(), packed.id());
} catch (std::exception &) {
// levId was deleted when query was paused
}