Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion include/simdb/apps/argos/ArgosCollector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,19 @@ class ArgosCollector : public App, public PipelineStagerInterface
{
auto window_id = ledger->getWindowId();

// Keep track of the CIDs that are used to call createCheckpoint(),
// and skip those CIDs in the calls to closeRecord(). If we allow
// the closeRecord() API call, the collected data does not show
// up in the UI.
std::unordered_set<uint16_t> chkpt_cids;

auto scalars = ledger->releaseScalarEntries();
for (auto& scalar : scalars)
{
auto cid = scalar.cid;
auto data = std::move(scalar.scalar_bytes);
checkpointers_.at(cid)->createCheckpoint(window_id, std::move(data));
chkpt_cids.insert(cid);
}

auto contigs = ledger->releaseContigEntries();
Expand All @@ -453,6 +460,7 @@ class ArgosCollector : public App, public PipelineStagerInterface
auto data = std::move(contig.contig_bin_bytes);
updateContainerMaxSize_(cid, detail::getContainerSize(data));
checkpointers_.at(cid)->createCheckpoint(window_id, std::move(data));
chkpt_cids.insert(cid);
}

auto sparses = ledger->releaseSparseEntries();
Expand All @@ -462,11 +470,15 @@ class ArgosCollector : public App, public PipelineStagerInterface
auto data = std::move(sparse.sparse_bin_bytes);
updateContainerMaxSize_(cid, detail::getContainerSize(data));
checkpointers_.at(cid)->createCheckpoint(window_id, std::move(data));
chkpt_cids.insert(cid);
}

for (const auto cid : ledger->getClosedCIDs())
{
checkpointers_.at(cid)->closeRecord(window_id);
if (chkpt_cids.count(cid) == 0)
{
checkpointers_.at(cid)->closeRecord(window_id);
}
}

CollectionEntries to_send;
Expand Down
Loading