{"record":{"id":"3eac9b7f6b8ed3c7","repo":"qishibo/AnotherRedisDesktopManager","slug":"this-t-message-delete-failed-3eac9b","errorCode":null,"errorMessage":"this.$t('message.delete_failed')","messagePattern":"this\\.\\$t\\('message\\.delete_failed'\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/components/contents/KeyContentTimeSeries.vue","lineNumber":377,"sourceCode":"        }).catch((e) => { this.$message.error(e.message); });\n      }\n    },\n    deleteLine(row) {\n      this.$confirm(\n        this.$t('message.confirm_to_delete_row_data'),\n        { type: 'warning' },\n      ).then(() => {\n        this.client.call('TS.DEL', this.redisKey, row.timestamp, row.timestamp).then((reply) => {\n          if (reply > 0) {\n            this.$message.success({\n              message: this.$t('message.delete_success'),\n              duration: 1000,\n            });\n\n            this.tsData.splice(this.tsData.indexOf(row), 1);\n            this.total--;\n          } else {\n            this.$message.error({\n              message: this.$t('message.delete_failed'),\n              duration: 1000,\n            });\n          }\n        }).catch((e) => { this.$message.error(e.message); });\n      }).catch(() => {});\n    },\n  },\n  mounted() {\n    this.initShow();\n  },\n};\n</script>\n\n<style type=\"text/css\">\n  .key-content-series .ts-toolbar .el-form-item {\n    margin-bottom: 10px;\n  }","sourceCodeStart":359,"sourceCodeEnd":395,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/contents/KeyContentTimeSeries.vue#L359-L395","documentation":"Application-level toast ('Deletion Failed') when TS.DEL key ts ts resolves with reply <= 0 in KeyContentTimeSeries.vue:377. TS.DEL returns the count of deleted samples; 0 means no sample exists at exactly that timestamp in the closed range [ts, ts]. The command succeeded — the sample is simply absent, usually because it was already deleted or a compaction rule collapsed it.","triggerScenarios":"TS.DEL returns 0 when: the row is stale — another operator or the app itself already removed the sample; a compaction rule (TS.CREATERULE, shown in the key's info as 'rules') aggregated 1h-max style buckets so raw samples were dropped; retention expired the sample; the timestamp cell was edited to a ts that never existed.","commonSituations":"Deleting rows in a series with downsampling rules configured (source samples compacted away); double-delete from a stale page; editing the timestamp then deleting; clock-precision mismatches (sample stored at different ms).","solutions":["Reload the key view; if the row disappeared, the earlier delete or compaction already handled it","Open the series info dialog and check the compaction rules — source samples may not exist individually","Delete from the refreshed page so row timestamps match stored samples","If a specific sample must go, confirm its exact ts via TS.RANGE key ts ts first"],"exampleFix":"// before\nthis.client.call('TS.DEL', this.redisKey, row.timestamp, row.timestamp).then((reply) => {\n  if (reply > 0) { /* success */ } else { this.$message.error(this.$t('message.delete_failed')); }\n});\n\n// after: verify existence first and refresh the stale row instead of erroring\nthis.client.call('TS.RANGE', this.redisKey, row.timestamp, row.timestamp, 'COUNT', 1).then((found) => {\n  if (!found || !found.length) {\n    this.tsData.splice(this.tsData.indexOf(row), 1);\n    return this.$message.warning(this.$t('message.delete_failed'));\n  }\n  return this.client.call('TS.DEL', this.redisKey, row.timestamp, row.timestamp);\n});","handlingStrategy":"validation","validationCode":"// confirm the sample exists at exactly that ts before TS.DEL ts ts\nconst found = await this.client.call('TS.RANGE', this.redisKey, row.timestamp, row.timestamp, 'COUNT', 1);\nif (!found || !found.length) {\n  this.tsData.splice(this.tsData.indexOf(row), 1); // drop the stale row\n  this.$message.warning(this.$t('message.delete_failed'));\n  return;\n}\nawait this.client.call('TS.DEL', this.redisKey, row.timestamp, row.timestamp);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check TS.INFO 'rules' — compaction removes raw samples, making per-sample deletes impossible","Delete from a freshly loaded page so displayed timestamps match stored ones","Treat reply==0 as stale-row signal: resync instead of retrying the same delete"],"tags":["redis","redistimeseries","ts-del","stale-state","ardm"],"backgroundTag":"redis-write-no-op","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}