Yicong-Huang commented on code in PR #5280:
URL: https://github.com/apache/texera/pull/5280#discussion_r3331286121


##########
amber/src/main/python/pytexera/storage/large_binary_manager.py:
##########
@@ -31,6 +30,20 @@
 _s3_client = None
 DEFAULT_BUCKET = "texera-large-binaries"
 
+# Set at executor init and read by create()
+_current_execution_id = None
+
+
+def set_current_execution_id(execution_id):
+    """Sets the execution id used to scope large binaries created by this 
worker."""
+    global _current_execution_id
+    _current_execution_id = execution_id
+
+
+def get_current_execution_id():
+    """Returns the execution id set for this worker, or None if unset."""
+    return _current_execution_id

Review Comment:
   please avoid using global variable to manage state. it is better to create a 
manager class for this kind of purpose.



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