dennishuo commented on code in PR #1000:
URL: https://github.com/apache/polaris/pull/1000#discussion_r1964877242
##########
service/common/src/main/java/org/apache/polaris/service/task/TaskExecutorImpl.java:
##########
@@ -28,57 +27,47 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
-import org.apache.polaris.core.PolarisConfigurationStore;
-import org.apache.polaris.core.PolarisDiagnostics;
-import org.apache.polaris.core.context.RealmContext;
+import org.apache.polaris.core.context.CallContext;
import org.apache.polaris.core.entity.PolarisBaseEntity;
import org.apache.polaris.core.entity.PolarisEntity;
import org.apache.polaris.core.entity.PolarisEntityType;
import org.apache.polaris.core.entity.TaskEntity;
import org.apache.polaris.core.persistence.MetaStoreManagerFactory;
import org.apache.polaris.core.persistence.PolarisMetaStoreManager;
-import org.apache.polaris.core.persistence.PolarisMetaStoreSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Given a list of registered {@link TaskHandler}s, execute tasks
asynchronously with the provided
- * {@link RealmContext}.
+ * {@link CallContext}.
*/
public class TaskExecutorImpl implements TaskExecutor {
private static final Logger LOGGER =
LoggerFactory.getLogger(TaskExecutorImpl.class);
private static final long TASK_RETRY_DELAY = 1000;
+ private final CallContext callContext;
private final Executor executor;
private final MetaStoreManagerFactory metaStoreManagerFactory;
- private final PolarisConfigurationStore configurationStore;
- private final PolarisDiagnostics diagnostics;
private final TaskFileIOSupplier fileIOSupplier;
- private final Clock clock;
private final List<TaskHandler> taskHandlers = new CopyOnWriteArrayList<>();
public TaskExecutorImpl(
+ CallContext callContext,
Review Comment:
Since this basically is coming from `QuarkusTaskExecutorImpl` which can't
possibly be injecting the correct CallContext, let's leave this out of the
constructor for now. We need to figure out how to propagate the original call
context for the `ManifestFileCleanupTaskHandler` and `TableCleanupTaskHandler`
in different ways.
The pattern established here is that `addTaskHandlerContext` apparently is
how we preserve a CallContext manually. So we just need to make sure that thing
plumbs through.
--
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]