Skip to content

Commit

Permalink
RavenDB-23532 - use a single raftid
Browse files Browse the repository at this point in the history
  • Loading branch information
grisha-kotler committed Jan 13, 2025
1 parent b57bafd commit c498e6b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,12 @@ protected async Task<long> SaveDatabaseRecordAsync(string databaseName, Database
// at this point we restored a large portion of the database or all of it
// we'll retry saving the database record since a failure here will cause us to abort the entire restore operation

var raftId = RaftIdGenerator.NewId();

var index = await BackupHelper.RunWithRetriesAsync(maxRetries: 10, async () =>
{
var result = await ServerStore.WriteDatabaseRecordAsync(
databaseName, databaseRecord, null, RaftIdGenerator.NewId(), databaseValues, isRestore: true);
databaseName, databaseRecord, null, raftId, databaseValues, isRestore: true);
return result.Index;
},
"Saving the database record",
Expand Down

0 comments on commit c498e6b

Please sign in to comment.