Skip to content

Commit

Permalink
Do not upsert users when tracking counters. Closes #200
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Aug 17, 2023
1 parent 1c2e30e commit 6d8398e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,7 @@ public async Task BatchWriteAsync(List<((string AppId, string UserId) Key, Count
updates.Add(Update.Inc($"d.Counters.{key}", value));
}

var model = new UpdateOneModel<MongoDbUser>(Filter.Eq(x => x.DocId, docId), Update.Combine(updates))
{
IsUpsert = true
};
var model = new UpdateOneModel<MongoDbUser>(Filter.Eq(x => x.DocId, docId), Update.Combine(updates));

writes.Add(model);
}
Expand Down

0 comments on commit 6d8398e

Please sign in to comment.