Company
Date Published
Author
Rahul Desirazu
Word count
1326
Language
English
Hacker News points
None

Summary

The problem of runaway queries in distributed SQL databases arises when queries consume excessive I/O and CPU resources, impacting other clients even after the query has timed out. In YugabyteDB, this issue can be caused by a SELECT * command without a LIMIT clause executing on multiple tablets, leading to high disk utilization and CPU usage. To mitigate this problem, the YQL timeout is propagated to DocDB through an RPC, where it is converted to a deadline, allowing the iterator to build responses while preventing resource monopolization. This solution ensures that both YQL and DocDB have matching deadlines, reducing the impact of runaway queries on the cluster's performance.