andrii29 opened a new issue, #3695:
URL: https://github.com/apache/polaris/issues/3695

   ### Describe the bug
   
   We ran into an issue when trying to delete an Iceberg table and its data 
using Polaris (1.3.0) through Trino while using 
`polaris.features.DROP_WITH_PURGE_ENABLED: "true"`.
   
   ```
   trino> DROP TABLE iceberg.test.inventory2;
   
   2026-02-06 12:50:12,012 INFO  [io.qua.htt.access-log] 
[51d05ab5-88b1-4613-b6ac-590c73238304_0000000000000000020,POLARIS] [,,,] 
(executor-thread-2) 10.250.16.13 - quickstart_user [06/Feb/2026:12:50:12 +0000] 
"DELETE 
/api/catalog/v1/quickstart_catalog/namespaces/test/tables/inventory2?purgeRequested=true
 HTTP/1.1" 204 -
   2026-02-06 12:50:12,021 INFO  [org.apa.pol.ser.tas.TaskExecutorImpl] 
[51d05ab5-88b1-4613-b6ac-590c73238304_0000000000000000020,POLARIS] 
[3c132ae93e2c6eeb215e74fc5afa23e3,,743b134f54e02736,true] (executor-thread-3) 
Handling task entity id 3919859537221867440
   2026-02-06 12:50:12,031 INFO  [org.apa.pol.ser.tas.TableCleanupTaskHandler] 
[51d05ab5-88b1-4613-b6ac-590c73238304_0000000000000000020,POLARIS] 
[3c132ae93e2c6eeb215e74fc5afa23e3,,743b134f54e02736,true] (executor-thread-3) 
tableIdentifier=test.inventory2 
metadataLocation=s3://bucket123/test/inventory2-9cd21972747a422a8219ea2267b49c22/metadata/00000-a142d83b-4738-48c3-9c80-e992628bbcbb.metadata.json
 Handling table metadata cleanup task
   2026-02-06 12:50:13,034 WARN  [org.apa.pol.ser.tas.TaskExecutorImpl] [,] 
[,,,] (executor-thread-3) Failed to handle task entity id 3919859537221867440: 
java.util.concurrent.CompletionException: 
jakarta.enterprise.context.ContextNotActiveException: RequestScoped context was 
not active when trying to obtain a bean instance for a client proxy of CLASS 
bean [class=org.apache.polaris.service.task.TaskFileIOSupplier, 
id=7kBDtfomB8MiW4C8Cl5bNPGxnxg]
           - you can activate the request context for a specific method using 
the @ActivateRequestContext interceptor binding
           at 
java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
           at 
java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
           at 
java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
           at 
io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)
           at 
org.jboss.threads.EnhancedViewExecutor$EnhancedViewExecutorRunnable.run(EnhancedViewExecutor.java:496)
           at 
io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:645)
           at 
org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)
           at 
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)
           at 
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1586)
           at 
org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
           at 
org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
           at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
           at java.base/java.lang.Thread.run(Thread.java:1583)
   Caused by: jakarta.enterprise.context.ContextNotActiveException: 
RequestScoped context was not active when trying to obtain a bean instance for 
a client proxy of CLASS bean 
[class=org.apache.polaris.service.task.TaskFileIOSupplier, 
id=7kBDtfomB8MiW4C8Cl5bNPGxnxg]
           - you can activate the request context for a specific method using 
the @ActivateRequestContext interceptor binding
           at io.quarkus.arc.impl.ClientProxies.notActive(ClientProxies.java:76)
           at 
io.quarkus.arc.impl.ClientProxies.getSingleContextDelegate(ClientProxies.java:32)
           at 
org.apache.polaris.service.task.TaskFileIOSupplier_ClientProxy.arc$delegate(Unknown
 Source)
           at 
org.apache.polaris.service.task.TaskFileIOSupplier_ClientProxy.apply(Unknown 
Source)
           at 
org.apache.polaris.service.task.TableCleanupTaskHandler.handleTask(TableCleanupTaskHandler.java:96)
           at 
org.apache.polaris.service.task.TaskExecutorImpl.handleTask(TaskExecutorImpl.java:172)
           at 
org.apache.polaris.service.task.TaskExecutorImpl.handleTaskWithTracing(TaskExecutorImpl.java:209)
           at 
org.apache.polaris.service.task.TaskExecutorImpl.lambda$tryHandleTask$0(TaskExecutorImpl.java:135)
           at 
java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
           ... 10 more
   ```
   polaris docker compose
   ```
   polaris:
       image: apache/polaris:1.3.0-incubating
       environment:
         JAVA_DEBUG: true
         JAVA_DEBUG_PORT: "*:5005"
         AWS_REGION: us-west-2
         AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER}
         AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}
         POLARIS_BOOTSTRAP_CREDENTIALS: 
POLARIS,${ROOT_CLIENT_ID},${ROOT_CLIENT_SECRET}
         polaris.realm-context.realms: ${POLARIS_REALM}
         polaris.authentication.type: mixed
         quarkus.otel.sdk.disabled: "true"
         polaris.features.DROP_WITH_PURGE_ENABLED: "true"
         polaris.features.CLEANUP_ON_CATALOG_DROP: "true"
         polaris.features.STORAGE_CREDENTIAL_DURATION_SECONDS: "36000"
         POLARIS_PERSISTENCE_TYPE: relational-jdbc
         QUARKUS_DATASOURCE_DB_KIND: postgresql
         QUARKUS_DATASOURCE_USERNAME: ${POSTGRES_USER}
         QUARKUS_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
         QUARKUS_DATASOURCE_JDBC_URL: 
jdbc:[postgresql://postgres:5432/${POSTGRES_DB}](postgresql://postgres:5432/$%7BPOSTGRES_DB%7D)
   ```
   
   ### To Reproduce
   
   1. Clone repo 
https://github.com/andrii29/trino-polaris-delete-purge-issue/tree/main
   2. Check `README.md` file
   
   ### Actual Behavior
   
   Table data in MinIO is present.
   
   ### Expected Behavior
   
   Whole table data in MinIO is deleted.
   
   ### Additional context
   
   _No response_
   
   ### System information
   
   OS: Linux
   Polaris Catalog Version: 1.3.0
   Object storage & setup: Minio


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