You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2025/10/15 22:02:15 UTC

[PR] HRW: Better txn slot management [trafficserver]

zwoop opened a new pull request, #12566:
URL: https://github.com/apache/trafficserver/pull/12566

   This also fixes a real bug, where the txn slot for the state variables could overlap / conflict with the control mechanism and its txn slot. They need to have different names.


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HRW: Better txn slot management [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #12566:
URL: https://github.com/apache/trafficserver/pull/12566#issuecomment-3408514550

   Some or all of this needs to go to 10.1.x. Particularly the name of the private txn slot is critically, that will definitely break any configuration using both slots.


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HRW: Better txn slot management [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop merged PR #12566:
URL: https://github.com/apache/trafficserver/pull/12566


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HRW: Better txn slot management [trafficserver]

Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #12566:
URL: https://github.com/apache/trafficserver/pull/12566#issuecomment-3426753261

   Added to milestone 10.1.1 via #12589 


-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] HRW: Better txn slot management [trafficserver]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12566:
URL: https://github.com/apache/trafficserver/pull/12566#discussion_r2434089536


##########
plugins/header_rewrite/statement.cc:
##########
@@ -92,29 +87,27 @@ Statement::acquire_txn_slot()
     return index;
   }();
 
-  _txn_slot = txn_slot_index;
+  return txn_slot_index;
 }
 
-void
+int
 Statement::acquire_txn_private_slot()
 {
-  // Don't do anything if we don't need it
-  if (!need_txn_private_slot() || _txn_private_slot >= 0) {
-    return;
-  }
-
   // Only call the index reservation once per plugin load
   static int txn_private_slot_index = []() -> int {
-    int index = -1;
+    int         index = -1;
+    std::string name  = PLUGIN_NAME;
+
+    name += "_priv";
 

Review Comment:
   [nitpick] Consider constructing the string in a single expression (e.g., `std::string name = std::string(PLUGIN_NAME) + \"_priv\";`) to improve code clarity and reduce the number of operations.
   ```suggestion
       std::string name  = std::string(PLUGIN_NAME) + "_priv";
   ```



-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org