Skip to content

Commit

Permalink
Aggregate operation is throwing MongoExecutionTimeoutException in pro…
Browse files Browse the repository at this point in the history
…d which is not getting caught and logged
  • Loading branch information
mihirgt committed Jan 21, 2025
1 parent 049e1bf commit 6b406de
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import static org.hypertrace.core.documentstore.mongo.query.parser.MongoSortTypeExpressionParser.getSortClause;

import com.mongodb.BasicDBObject;
import com.mongodb.MongoCommandException;
import com.mongodb.ServerAddress;
import com.mongodb.ServerCursor;
import com.mongodb.client.AggregateIterable;
Expand Down Expand Up @@ -181,7 +180,7 @@ public MongoCursor<BasicDBObject> aggregate(
.allowDiskUse(true);

return iterable.cursor();
} catch (final MongoCommandException e) {
} catch (final Exception e) {

Check warning on line 183 in document-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/MongoQueryExecutor.java

View check run for this annotation

Codecov / codecov/patch

document-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/MongoQueryExecutor.java#L183

Added line #L183 was not covered by tests
log.error("Execution failed for query: {}. Aggregation Pipeline: {}", query, pipeline);
throw e;
}
Expand Down

0 comments on commit 6b406de

Please sign in to comment.