morningman commented on pull request #6192: URL: https://github.com/apache/incubator-doris/pull/6192#issuecomment-878801096
> I think this feature is used to block some abnormal sql, for example , sql caused core. Is it need to limit the number of rules, which will occupied a lot of memory. Is is better to store the hash value of a sql, not the sql self, when a sql is very long? Using hash to block problematic SQL may also be a practical requirement. In some cases, we need to quickly block some SQL that affects the cluster through the block rules. There are pros and cons to using regular expressions or hash values: 1. It is more flexible for regular expressions, and can match a series of sql through one rule. But the disadvantage is that the threshold for using regular expressions is high, and wrong expressions may result in matching wrong SQL. 2. The disadvantage of Hash value is that it can only perform complete matching, but it takes up less space and matches more quickly. But any change in SQL will cause a change in its hash value, such as spaces, line breaks, and so on. Therefore, I suggest that we can print the hash value corresponding to sql in `fe.audit.log`, so that users can conveniently use the hash value in the log to quickly add block rule. In summary, we can implement two block rules, one based on hash and the other based on regular expressions. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org