Skip to content

Commit

Permalink
fix: mongodb commitIndexBuild panic in olpog-replay
Browse files Browse the repository at this point in the history
Signed-off-by: sayedppqq <sayed@appscode.com>
  • Loading branch information
sayedppqq committed Apr 24, 2024
1 parent d04e4e0 commit 83d78d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/databases/mongo/oplog/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ func indexSpecFromCommitIndexBuilds(op db.Oplog) (string, []client.IndexDocument
if !ok {
return "", nil, NewTypeAssertionError("bson.D", fmt.Sprintf("indexes[%d]", i), elemE.Value)
}
for i := range elements {
elemE = elements[i]
for j := range elements {
elemE = elements[j]
if elemE.Key == "key" {
if indexSpecs[i].Key, ok = elemE.Value.(bson.D); !ok {
return "", nil, NewTypeAssertionError("bson.D", "key", elemE.Value)
Expand Down

0 comments on commit 83d78d6

Please sign in to comment.