git-hulk commented on code in PR #628:
URL: https://github.com/apache/incubator-kvrocks/pull/628#discussion_r893438835


##########
src/event_listener.cc:
##########
@@ -59,6 +59,15 @@ const std::string compressType2String(const 
rocksdb::CompressionType type) {
   return iter->second;
 }
 
+bool isDiskQuotaExceeded(const rocksdb::Status &bg_error) {
+    // EDQUOT: Disk quota exceeded (POSIX.1-2001)
+    std::string exceeded_quota_str = "Disk quota exceeded";
+    std::string err_msg = bg_error.ToString();
+
+    std::size_t found = err_msg.find(exceeded_quota_str);
+    return found != std::string::npos;

Review Comment:
   ```suggestion
       return err_msg.find(exceeded_quota_str) != std::string::npos;
   
   ```



-- 
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]

Reply via email to