Skip to content

Watch sync fails when Fragment is false #19441

Closed
@kevburnsjr

Description

@kevburnsjr

Bug report criteria

What happened?

Server having four revisions to sync returns 1 response with 48 events @ 4.8 MB resulting in an error

rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4802091 vs. 4194304)

What did you expect to happen?

Server having four revisions to sync returns 4 responses with 12 events each @ 1.2 MB per response

How can we reproduce it (as minimally and precisely as possible)?

See failing test in #19442

  • Submit 4 transactions putting 12 keys each with values of size 100KB
  • Start a new watch with:
    • StartRevision = The revision of the first of the four transactions
    • Fragment = false

Anything else we need to know?

Max response size is set to default of 1.5 MB

Etcd version (please run commands below)

Reproduced in

  • v3.3.27
  • v3.4.35
  • v3.5.18
  • main

Possibly related

#8188 (comment)

Etcd configuration (command line flags or environment variables)

docker-compose.yml

# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

services:
  etcd1:
    image: docker.io/bitnami/etcd:3.3
    environment:
      - ALLOW_NONE_AUTHENTICATION=yes
      - ETCD_NAME=etcd1
      - ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd1:2380
      - ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
      - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
      - ETCD_ADVERTISE_CLIENT_URLS=http://etcd1:2379
      - ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
      - ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
      - ETCD_LOG_LEVEL=debug
      - ETCD_INITIAL_CLUSTER_STATE=new
    ports:
      - 2379:2379
      - 11180:11180
    volumes:
      - type: tmpfs
        target: /bitnami
        tmpfs:
          mode: 01777
  etcd2:
    image: docker.io/bitnami/etcd:3.3
    environment:
      - ALLOW_NONE_AUTHENTICATION=yes
      - ETCD_NAME=etcd2
      - ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd2:2380
      - ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
      - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
      - ETCD_ADVERTISE_CLIENT_URLS=http://etcd2:2379
      - ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
      - ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
      - ETCD_LOG_LEVEL=debug
      - ETCD_INITIAL_CLUSTER_STATE=new
    ports:
      - 22379:2379
      - 21180:11180
    volumes:
      - type: tmpfs
        target: /bitnami
        tmpfs:
          mode: 01777
  etcd3:
    image: docker.io/bitnami/etcd:3.3
    environment:
      - ALLOW_NONE_AUTHENTICATION=yes
      - ETCD_NAME=etcd3
      - ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd3:2380
      - ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
      - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
      - ETCD_ADVERTISE_CLIENT_URLS=http://etcd3:2379
      - ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
      - ETCD_INITIAL_CLUSTER=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
      - ETCD_LOG_LEVEL=debug
      - ETCD_INITIAL_CLUSTER_STATE=new
    ports:
      - 32379:2379
      - 31180:11180
    volumes:
      - type: tmpfs
        target: /bitnami
        tmpfs:
          mode: 01777

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

See failing test in #19442

> go test -run=TestV3WatchLargeTxnFragmentFalse -v
=== RUN   TestV3WatchLargeTxnFragmentFalse
    v3_watch_test.go:1656:
        Error Trace:    /home/kev/etcd/tests/integration/v3_watch_test.go:1656
                        /home/kev/etcd/tests/integration/v3_watch_test.go:1601
        Error:          Expected nil, but got: &status.Error{s:(*status.Status)(0xc000090098)}
        Test:           TestV3WatchLargeTxnFragmentFalse
        Messages:       rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4802091 vs. 4194304)

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions