Possibly fixed persistence failure when trying to duplicate fill.
This commit is contained in:
1 parent
0c4e22537d
commit
0ec955cc90
1 file changed
+5
-3
@@ -73,16 +73,17 @@ void FillStore::init() {
|
||||
LOG(persist, Info, "Loading load all fills");
|
||||
auto all = me->store->retrieve_all()[fills_ns];
|
||||
LOG(persist, Info, "Finished loading all {} fills", all.size());
|
||||
for (auto const &kvp : all)
|
||||
for (auto const &kvp : all) {
|
||||
auto fk = kvp.first;
|
||||
me->known_fills.insert(fk);
|
||||
|
||||
if (utils::pb::from_string<api::orderman::Fill>(kvp.second,
|
||||
&fill)) {
|
||||
|
||||
auto sec = sec_idx[SecurityKey(fill.security_key())];
|
||||
if (sec) {
|
||||
auto fk = kvp.first;
|
||||
if (!me->sod_pos_map.add_fill_to_sod_pos(fill))
|
||||
stored_batch.emplace_back(fill, *sec);
|
||||
me->known_fills.insert(fk);
|
||||
} else
|
||||
LOG(persist, Diag,
|
||||
"Stored fill {} contains unresolved security {}. ",
|
||||
@@ -92,6 +93,7 @@ void FillStore::init() {
|
||||
"Could not recover fill {} from storage. "
|
||||
"This should be investigated",
|
||||
kvp.first);
|
||||
}
|
||||
me->fill_stream = make_stream<StoredFillEvent>();
|
||||
LOG(OrderMan, Info,
|
||||
"Fill Store published {} fills recoved from disk out of {} "
|
||||
|
||||
Reference in new issue
Block a user