-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Service Arch
-
Fully Compatible
-
ALL
-
Service Arch 2024-01-22
Caught this while adapting max_conns_override.js to use gRPC metrics is the db is using gRPC to connect, which will go in with SERVER-84471.
When we hit the max connections, startSession() returns without setting a termination status, and we hit an invariant in gRPC because the callback has returned without a termination status getting set.
[js_test:max_conns_override] {"t":{"$date":"2024-01-12T19:02:26.493Z"},"s":"I", "c":"NETWORK", "id":8050201, "ctx":"js","msg":"Creating new connection","attr":{"hostAndPort":"127.0.0.1:20041","gRPC":true}} [js_test:max_conns_override] d20040| {"t":{"$date":"2024-01-12T19:02:26.495+00:00"},"s":"I", "c":"NETWORK", "id":22942, "ctx":"thread29","msg":"Connection refused because there are too many open connections","attr":{"remote":"127.0.0.1:59188","connectionCount":5}} [js_test:max_conns_override] d20040| {"t":{"$date":"2024-01-12T19:02:26.497+00:00"},"s":"F", "c":"ASSERT", "id":23079, "ctx":"thread29","msg":"Invariant failure","attr":{"expr":"status.has_value()","file":"src/mongo/transport/grpc/service.cpp","line":289}} [js_test:max_conns_override] d20040| {"t":{"$date":"2024-01-12T19:02:26.497+00:00"},"s":"F", "c":"ASSERT", "id":23080, "ctx":"thread29","msg":"\n\n***aborting after invariant() failure\n\n"}