Skip to content

DatalossCheck RPC may bust gRPC message length limits

The DatalossCheck RPC checks for repositories that have data loss. The response returned by this RPC is essentially unbounded in length as it scales with the number of repositories that have data loss. But we didn't take this into account in the initial design of this RPC and only return a single response instead of a stream of responses. Consequentially, it is possible to bust the gRPC message length limits, which makes the RPC unusable once the number of repositories with data loss exceeds a certain threshold.

We need to fix this by introducing a new RPC that returns a stream of responses.

Example of error message:

/opt/gitlab/embedded/bin/praefect -config /var/opt/gitlab/praefect/config.toml dataloss
error checking: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (6304800 vs. 4194304)
Edited by Andrew Winata
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information