Rachelint commented on code in PR #1507:
URL: 
https://github.com/apache/incubator-horaedb/pull/1507#discussion_r1544100093


##########
src/proxy/src/write.rs:
##########
@@ -506,7 +506,35 @@ impl Proxy {
             .await?;
 
         let mut success = 0;
-        for insert_plan in plan_vec {
+
+        // TODO: concurrently run the insert plan here
+        for plan in plan_vec {
+            // check limit first
+            // TODO: if one table is blocked, maybe should not lead to failure 
of whole
+            // batch?
+            self.instance
+                .limiter
+                .try_limit(&plan)
+                .box_err()
+                .context(ErrWithCause {
+                    code: StatusCode::INTERNAL_SERVER_ERROR,
+                    msg: "table is blocked",
+                })?;
+
+            let insert_plan = match plan {

Review Comment:
   I think the steps should be:
   - build plan
   - check plan
   - execute the valid plan
   
   It maybe  strange to mixed build step and check step?



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