VividByteWorker opened a new issue, #59851:
URL: https://github.com/apache/doris/issues/59851

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   doris 2.1.8
   
   ### What's Wrong?
   
   table:
   CREATE TABLE `evaluation_result` (
     `resource_identifier` varchar(1024) NOT NULL COMMENT "",
     `account_id` bigint NOT NULL COMMENT "",
     `resource_type` varchar(256) NOT NULL COMMENT "",
     `region` varchar(128) NOT NULL COMMENT "",
     `rule_id` varchar(64) NOT NULL COMMENT "",
     `resource_description_id` varchar(256) NOT NULL COMMENT "",
     `task_id` bigint NOT NULL,
     `id` bigint NOT NULL AUTO_INCREMENT(1) COMMENT "",
     `resource_id` varchar(128) NOT NULL COMMENT "",
     `compliance_type` varchar(32) NOT NULL COMMENT "",
     `evaluation_time` bigint NOT NULL COMMENT "",
     `trigger_type` varchar(32) NOT NULL,
     `failed_reason` text NOT NULL DEFAULT "",
     `risk_level` varchar(16) NOT NULL DEFAULT "",
     `status` tinyint NOT NULL DEFAULT "0",
     `annotation` varchar(1024) NOT NULL DEFAULT "" COMMENT "",
     `invocation_time` bigint NOT NULL DEFAULT "0" COMMENT "",
     `account_group_id` varchar(64) NOT NULL DEFAULT "",
     `tags_obj` json NULL,
     `project` varchar(128) NOT NULL DEFAULT "",
     `deleted_at` bigint NOT NULL DEFAULT "0",
     `rule_name` varchar(512) NOT NULL DEFAULT "",
     INDEX idx_rule_id (`rule_id`) USING INVERTED,
     INDEX idx_task_id (`task_id`) USING INVERTED,
     INDEX idx_evaluation_time (`evaluation_time`) USING INVERTED,
     INDEX idx_resource_id (`resource_id`) USING INVERTED
   ) ENGINE=OLAP
   UNIQUE KEY(`resource_identifier`, `account_id`, `resource_type`, `region`, 
`rule_id`)
   DISTRIBUTED BY HASH(`resource_identifier`, `account_id`, `resource_type`, 
`region`, `rule_id`) BUCKETS 32
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 3",
   "min_load_replica_num" = "-1",
   "is_being_synced" = "false",
   "storage_medium" = "ssd",
   "storage_format" = "V2",
   "inverted_index_storage_format" = "V1",
   "enable_unique_key_merge_on_write" = "true",
   "light_schema_change" = "true",
   "function_column.sequence_col" = "task_id",
   "store_row_column" = "true",
   "row_store_page_size" = "4096",
   "disable_auto_compaction" = "false",
   "enable_single_replica_compaction" = "false",
   "group_commit_interval_ms" = "5000",
   "group_commit_data_bytes" = "134217728",
   "enable_mow_light_delete" = "false"
   );
   MySQL [config_server]> select count(*) FROM evaluation_result
   +----------+
   | count(1) |
   +----------+
   | 80027259 |
   +----------+
   1 row in set (0.109 sec)
   MySQL [config_server_online]> select count(*) from evaluation_result where 
account_id=2100000682;
   +----------+
   | count(*) |
   +----------+
   | 79879074 |
   +----------+
   1 row in set (0.040 sec)
   MySQL [config_server]> DELETE FROM evaluation_result WHERE account_id = 
2100000682;
   Query OK, 79879067 rows affected (10 min 40.096 sec)
   {'label':'label_b1d854dabc534cac_96b99158de695ec8', 'status':'VISIBLE', 
'txnId':'1915322'}
   MySQL [config_server]> SELECT COUNT(1) FROM `evaluation_result` WHERE 
account_id = 2100000682;
   +----------+
   | count(1) |
   +----------+
   | 79879067 |
   +----------+
   1 row in set (0.109 sec)
   
   
   ### What You Expected?
   
   after execute the sql: 
   
   > DELETE FROM evaluation_result WHERE account_id = 2100000682;
   
   the result of 'SELECT COUNT(1) FROM `evaluation_result` WHERE account_id = 
2100000682;' should be 0
   
   ### How to Reproduce?
   
   It is hard to reproduce the result.
   I found that the delete failed reason is the task_id is different from 
__DORIS_SEQUENCE_COL__, and task_id is less than __DORIS_SEQUENCE_COL__, so the 
delete failed. But why task_id is different from __DORIS_SEQUENCE_COL__ is 
still unknown.
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to