{
  "slug": "node-redis-watch-conflict",
  "files": {
    "png": {
      "url": "/rest/v1/diagram-sources/node-redis-watch-conflict/2/files/png",
      "sha256": "984364f079a22fc60cd9510767d983bec7be09c038d128c43062385d4315f38e"
    },
    "svg": {
      "url": "/rest/v1/diagram-sources/node-redis-watch-conflict/2/files/svg",
      "sha256": "8178c23cb4b034ba3cb2be70d35f13429b6dc2ac9a514c7c6b5c9d0b960775db"
    }
  },
  "title": "Redis WATCH conflict between two connections",
  "config": {
    "name": "watch-conflict",
    "style": "clean",
    "design": "sequence-lifelines-ordered-labeled-messages",
    "palette": [
      "#975c45"
    ],
    "parameters": {
      "messages": [
        {
          "to": "redis",
          "from": "a",
          "label": "WATCH key"
        },
        {
          "to": "redis",
          "from": "a",
          "label": "GET key"
        },
        {
          "to": "a",
          "from": "redis",
          "kind": "reply",
          "label": "Current value"
        },
        {
          "to": "redis",
          "from": "b",
          "label": "SET key (new value)"
        },
        {
          "to": "redis",
          "from": "a",
          "label": "MULTI … EXEC"
        },
        {
          "to": "a",
          "from": "redis",
          "kind": "reply",
          "label": "Null EXEC reply"
        }
      ],
      "participants": [
        {
          "id": "a",
          "icon": "tabler:lock",
          "label": "Watched connection",
          "description": "One pool.execute() callback"
        },
        {
          "id": "redis",
          "icon": "tabler:database",
          "label": "Redis server",
          "description": "Tracks watched keys"
        },
        {
          "id": "b",
          "icon": "tabler:code",
          "label": "Another connection",
          "description": "Updates the same key"
        }
      ]
    },
    "accessibility": {
      "title": "Redis WATCH conflict between two connections",
      "description": "One connection watches and reads a key. Another connection changes it before MULTI and EXEC. Redis returns a null EXEC reply, so none of the queued writes execute; Node Redis exposes this as WatchError."
    }
  },
  "project": "node-redis",
  "version": 2,
  "sourceUrl": "/rest/v1/diagram-sources/node-redis-watch-conflict/2/files/json",
  "licenseUrl": "/rest/v1/diagram-sources/node-redis-watch-conflict/2/files/license",
  "description": "One connection watches and reads a key. Another connection changes it before MULTI and EXEC. Redis returns a null EXEC reply, so none of the queued writes execute; Node Redis exposes this as WatchError."
}