Configure NoteDb change sequence batch size with an option
The large constant BATCH_SIZE was in part to avoid poor behavior on pushes of large numbers of changes, but those now use a bulk operation on RepoSequence anyway. For most usages we can default to a lower value, but still allow admins to raise it as necessary. Change-Id: I49edf1b9dd4b7d0aa47dd3f5eea489f8d88030f4
This commit is contained in:
@@ -37,8 +37,6 @@ import java.util.List;
|
||||
@SuppressWarnings("deprecation")
|
||||
@Singleton
|
||||
public class Sequences {
|
||||
private static final int BATCH_SIZE = 100;
|
||||
|
||||
private final Provider<ReviewDb> db;
|
||||
private final NotesMigration migration;
|
||||
private final RepoSequence changeSeq;
|
||||
@@ -63,7 +61,7 @@ public class Sequences {
|
||||
return db.get().nextChangeId() + gap;
|
||||
}
|
||||
},
|
||||
BATCH_SIZE);
|
||||
cfg.getInt("noteDb", "changes", "sequenceBatchSize", 20));
|
||||
}
|
||||
|
||||
public int nextChangeId() throws OrmException {
|
||||
|
||||
Reference in New Issue
Block a user