Skip to content

Watch on future revision might receive old events or notifications, happens when client connects to multiple members. #20221

Closed
@serathius

Description

@serathius

Bug report criteria

What happened?

Just yesterday we merged #20173 that added to both Robustness tests and Antithesis tests new type of client, one that connects to all members.

Within 1 day both frameworks found a new issue with watch: broke Bookmarkable - Progress notification events guarantee that all events up to a revision have been already delivered. Failures:

Example request for revision 148 returns event with revision 67.

{
  "Request": {
    "Key": "/registry/pods/",
    "Revision": 148,
    "WithPrefix": true,
    "WithProgressNotify": true,
    "WithPrevKV": true
  },
  "Responses": [
    {
      "Events": [
        {
          "Type": "put-operation",
          "Key": "/registry/pods/default/89523",
          "Value": {
            "Value": "65"
          },
          "Revision": 67,
          "PrevValue": {
            "Value": {
              "Value": "46"
            },
            "ModRevision": 35,
            "Version": 3
          }
        }
      ],
      "Revision": 67,
      "Time": 496351519816
    },

As this issue never appeared on clients connecting to single etcd member I expect this is an issue with client loadbalance/watch resume logic.

/cc @ahrtr @fuweid @siyuanfoundation @nwnt @joshjms @marcus-hodgson-antithesis

What did you expect to happen?

For watch request for revision 148, etcd should return revision not lower than 148.

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

Report by Antithesis: var_report_dump.tar.gz
Report by Robustness: results.tar.gz

Anything else we need to know?

Needs to confirm this is a bug on etcd client side and not robustness recording side.

Etcd version (please run commands below)

Robustness found it on etcd main, Antithesis on release-3.6

Etcd configuration (command line flags or environment variables)

paste your configuration here

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

$ etcdctl member list -w table
# paste output here

$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions