Check missing event count

This commit is contained in:
Neil Alexander 2021-01-04 13:03:43 +00:00
parent 597350a67f
commit 04417d7083
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -1005,6 +1005,7 @@ func (t *txnReq) lookupMissingStateViaStateIDs(ctx context.Context, roomID, even
return t.lookupMissingStateViaState(ctx, roomID, eventID, roomVersion) return t.lookupMissingStateViaState(ctx, roomID, eventID, roomVersion)
} }
if missingCount > 0 {
util.GetLogger(ctx).WithFields(logrus.Fields{ util.GetLogger(ctx).WithFields(logrus.Fields{
"missing": missingCount, "missing": missingCount,
"event_id": eventID, "event_id": eventID,
@ -1078,6 +1079,8 @@ func (t *txnReq) lookupMissingStateViaStateIDs(ctx context.Context, roomID, even
// Wait for the workers to finish. // Wait for the workers to finish.
fetchgroup.Wait() fetchgroup.Wait()
}
resp, err := t.createRespStateFromStateIDs(stateIDs) resp, err := t.createRespStateFromStateIDs(stateIDs)
return resp, err return resp, err
} }