Skip to content

Commit

Permalink
Don't request enc keys if not pending
Browse files Browse the repository at this point in the history
  • Loading branch information
islamaliev committed Aug 13, 2024
1 parent ff277b6 commit 20a1c79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/db/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,12 @@ func (mp *mergeProcessor) addPendingEncryptionRequest(docID string, fieldName im
}

func (mp *mergeProcessor) sendPendingEncryptionRequest() {
n := len(mp.pendingEncryptionKeyRequests)
if n == 0 {
return
}
schemaRoot := mp.col.SchemaRoot()
storeKeys := make([]core.EncStoreDocKey, 0, len(mp.pendingEncryptionKeyRequests))
storeKeys := make([]core.EncStoreDocKey, 0, n)
for k := range mp.pendingEncryptionKeyRequests {
storeKeys = append(storeKeys, k)
}
Expand Down

0 comments on commit 20a1c79

Please sign in to comment.