Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix replication service denial after MaxObjectSize increase #2911

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 8, 2024

  1. node/grpc: Fix calculation of max recv message size from object limit

    Since storage node serves `ObjectService.Replicate` RPC, the gRPC server
    must be able to accept the biggest allowed object. Previously, node set
    max size of received gRPC messages to sum of payload (`MaxObjectSize`
    network setting) and header (16K at the moment) size limits. This was
    not entirely correct because replication request message also contains
    non-object fields (only signature for now) and protobuf service bytes.
    Thus, when the size of an object approached the maximum allowed, it was
    possible to overflow the calculated limit and receive service refuse.
    
    This adds 1 KB to the calculated limit. This is a heuristic value that
    is larger than the current protocol version's query extra data, while
    supporting small extensions in advance. The exact value is meaningless
    given the smallness volume degrees.
    
    Signed-off-by: Leonard Lyubich <[email protected]>
    cthulhu-rider committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    8d0ac07 View commit details
    Browse the repository at this point in the history
  2. node/grpc: Change max recv msg size on MaxObjectSize setting update

    Since storage node serves `ObjectService.Replicate` RPC, the gRPC server
    must be able to accept the biggest allowed object. Previously, node
    calculated global message limit for the gRPC server once on startup.
    With this behavior, when network setting `MaxObjectSize` was increased,
    the node stopped accepting write objects larger than the previous limit.
    This manifested itself in a denial of replication service.
    
    From now storage node updates max received gRPC message size (if
    needed) on each refresh of the `MaxObjectSize` setting cache and via
    Netmap contract's polling done once per minute.
    
    Refs #2910.
    
    Signed-off-by: Leonard Lyubich <[email protected]>
    cthulhu-rider committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    19f39df View commit details
    Browse the repository at this point in the history