{
  "id": "go/grpc-data-loss-message-corrupted",
  "signature": "rpc error: code = DataLoss desc = message checksum mismatch: expected 0x1234, got 0x5678",
  "signature_zh": "rpc错误：代码=数据丢失 描述=消息校验和不匹配：期望0x1234，得到0x5678",
  "regex": "rpc\\ error:\\ code\\ =\\ DataLoss\\ desc\\ =\\ message\\ checksum\\ mismatch:\\ expected\\ 0x1234,\\ got\\ 0x5678",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The protobuf message was corrupted during transmission, causing a checksum validation failure.",
  "root_cause_type": "generic",
  "root_cause_zh": "protobuf消息在传输过程中被损坏，导致校验和验证失败。",
  "versions": [
    {
      "version": "1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Ignore the checksum and resend the same message.",
      "why_fails": "The same corruption may occur again if the underlying network issue persists.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable checksum validation on the server.",
      "why_fails": "This compromises data integrity and is not recommended.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Implement retry with a new context to avoid reusing corrupted data.",
      "success_rate": 0.8,
      "how": "for i := 0; i < 3; i++ {\n    ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)\n    resp, err := client.SomeRPC(ctx, req)\n    cancel()\n    if err == nil { return resp }\n    if status.Code(err) != codes.DataLoss { return err }\n    time.Sleep(100 * time.Millisecond)\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a reliable transport like TLS to reduce corruption.",
      "success_rate": 0.95,
      "how": "conn, err := grpc.Dial(\"localhost:8080\", grpc.WithTransportCredentials(creds))",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2025-05-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}