Skip to content

Commit 4f987ff

Browse files
committed
chore: auth check
1 parent e5abf11 commit 4f987ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mongodb/internal/backfill.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ func (m *Mongo) splitChunks(ctx context.Context, collection *mongo.Collection, s
268268
return timestampStrategy()
269269
default:
270270
chunks, err := splitVectorStrategy()
271-
if err != nil {
271+
// check if authorization error occurs
272+
if err != nil && strings.Contains(err.Error(), "not authorized") {
272273
logger.Warnf("failed to get chunks via split vector strategy: %s", err)
273274
return bucketAutoStrategy()
274275
}

0 commit comments

Comments
 (0)