{"record":{"id":"f7cec76efbc74429","repo":"qishibo/AnotherRedisDesktopManager","slug":"e-message-f7cec7","errorCode":null,"errorMessage":"e.message","messagePattern":"e\\.message","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/contents/KeyContentHash.vue","lineNumber":235,"sourceCode":"\n        // init hash field ttls\n        this.initTTL(hashData, listLength);\n\n        if (this.oneTimeListLength >= this.pageSize) {\n          this.scanStream.pause();\n          this.loadingIcon = '';\n        }\n      });\n\n      this.scanStream.on('end', () => {\n        this.loadingIcon = '';\n        this.loadMoreDisable = true;\n      });\n\n      this.scanStream.on('error', (e) => {\n        this.loadingIcon = '';\n        this.loadMoreDisable = true;\n        this.$message.error(e.message);\n      });\n    },\n    getScanMatch() {\n      return this.filterValue ? `*${this.filterValue}*` : '*';\n    },\n    openDialog() {\n      this.$nextTick(() => {\n        this.$refs.formatViewer.autoFormat();\n      });\n    },\n    showEditDialog(row) {\n      this.editLineItem = this.$util.cloneObjWithBuff(row);\n      this.beforeEditItem = row;\n      this.editDialog = true;\n    },\n    dumpCommand(item) {\n      const lines = item ? [item] : this.hashData;\n      const params = lines.map(line => `${this.$util.bufToQuotation(line.key)} ${","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/contents/KeyContentHash.vue#L217-L253","documentation":"Error toast fed by the 'error' event of the ioredis HSCAN stream (hscanBufferStream) in KeyContentHash.vue:235. The component listens on the scanStream EventEmitter; ioredis emits 'error' when a cursor round-trip fails — typically a dropped/closed connection mid-iteration, a READONLY reply from a replica, or WRONGTYPE because the key stopped being a hash. The handler also resets loadingIcon and disables 'load more', so the list stays partially loaded.","triggerScenarios":"hscanBufferStream emits error when: the TCP connection dies between SCAN cursors ('Connection is closed'); Redis failover/redirect happens during iteration; the key is DELeted and recreated as a string/zset so the next HSCAN returns WRONGTYPE; maxmemory/OOM policies reject subsequent SCAN-family reads; or the sentinel/cluster topology changes under the stream.","commonSituations":"Laptop sleep/resume while a large hash is paging in; SSH tunnel (tunnel-ssh) timing out during a long scan; scanning a hot key while a migration rewrites it; paging through millions of hash fields over a flaky VPN.","solutions":["Check whether the rest of the app also lost the connection (left tree, other tabs); reconnect and reload the key if so","If only this key fails, verify its type still shows 'hash' in the header — another client may have replaced it (WRONGTYPE)","Reduce the amount fetched per page or narrow the filter so fewer cursor round-trips are needed","For tunnels/VPN, increase keepalive timeouts in the connection config before scanning big hashes"],"exampleFix":"// before\nthis.scanStream.on('error', (e) => {\n  this.loadingIcon = '';\n  this.loadMoreDisable = true;\n  this.$message.error(e.message);\n});\n\n// after: allow reconnect + manual retry instead of permanently disabling pagination\nthis.scanStream.on('error', (e) => {\n  this.loadingIcon = '';\n  this.loadMoreDisable = !/closed|timed out/i.test(e.message);\n  this.scanStream = null; // force a fresh stream on next loadMore\n  this.$message.error(e.message);\n});","handlingStrategy":"try-catch","validationCode":"// start the scan only on a healthy connection\nif (this.client.status !== 'ready') {\n  this.$message.error(`connection not ready (${this.client.status})`);\n  return;\n}","typeGuard":null,"tryCatchPattern":"this.scanStream.on('error', (e) => {\n  this.loadingIcon = '';\n  this.scanStream = null;               // force fresh stream on next loadMore\n  this.loadMoreDisable = /WRONGTYPE/.test(e.message); // only hard-fail on shape errors\n  this.$message.error(e.message);\n});","preventionTips":["Reconnect and press load-more instead of assuming data loss — HSCAN cursors are stateless","Use ioredis retryStrategy/reconnectOnError so transient drops recover without killing the stream","Narrow the MATCH filter for very large hashes to shorten cursor iteration"],"tags":["redis","ioredis","scan-stream","connection-drop","ardm"],"backgroundTag":"redis-scan-stream-error","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}