sync: reduce device ids chunk size

This commit is contained in:
Abdullah Atta
2025-12-30 12:52:36 +05:00
parent 02ccd6cd06
commit 7e50311c92

View File

@@ -73,7 +73,7 @@ namespace Notesnook.API.Services
return result; return result;
} }
const int MaxIdsPerChunk = 400_000; const int MaxIdsPerChunk = 25_000;
public async Task AppendIdsAsync(string userId, string deviceId, string key, IEnumerable<ItemKey> ids) public async Task AppendIdsAsync(string userId, string deviceId, string key, IEnumerable<ItemKey> ids)
{ {
var filter = DeviceIdsChunkFilter(userId, deviceId, key) & Builders<DeviceIdsChunk>.Filter.Where(x => x.Ids.Length < MaxIdsPerChunk); var filter = DeviceIdsChunkFilter(userId, deviceId, key) & Builders<DeviceIdsChunk>.Filter.Where(x => x.Ids.Length < MaxIdsPerChunk);