Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Cohort Delete thows CleanupCohortTasket JDBC errors

Aperta
#2,334 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, sql
Ambito
backend, databases

Direzione di ricerca

Inizia con org.ohdsi.webapi.cohortdefinition.CleanupCohortTasklet e con la risorsa referenziata resources/cohortdefinition/sql/cleanupResults.sql. Riproduci l’eliminazione della coorte, esamina i log di WebAPI alla ricerca di errori JDBC di Redshift e Snowflake e confronta il comportamento del tasklet con le eliminazioni manuali. Il lavoro è completato quando l’eliminazione di una coorte pulisce i suoi record dagli schemi dei risultati CDM appropriati senza errori per i CDM non eseguiti o interessati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Expected behavior

(Using WebAPI 2.14.0 / Atlas 2.14.1)

When deleting a cohort, the org.ohdsi.webapi.cohortdefinition.CleanupCohortTasklet fires without error, and the cohort records are deleted from the pertinent cohort tables for all CDMs in which we've executed the cohort definition.

Actual behavior

(I've confirmed our JDBC connections and the service account's ability to delete from CDM results schemas.)

A few different things to cover here:

  1. It looks like this tasklet is attempted against all CDMs in WebAPI, even for those that haven't been executed. So we see JDBC errors for those, perhaps some additional logic to determine which to delete from would help here.

  2. The tasklet is unable to execute against Redshift:

ERROR taskExecutor-3 org.ohdsi.webapi.cohortdefinition.CleanupCohortTasklet - [] - Error deleting results for cohort: 992, cause: Could not get JDBC Connection; nested exception is java.sql.SQLNonTransientConnectionException: [Amazon][JDBC](10100) Connection Refused: [Amazon][JDBC](11640) Required Connection Key(s): PWD, UID; [Amazon][JDBC](11480) Optional Connection Key(s): AccessKeyID, AuthMech, AutoCreate, BlockingRowsMode, ClusterID, DbGroups, DisableIsValidQuery, DriverLogLevel, EndpointUrl, FilterLevel, IAMDuration, Language, loginTimeout, OpenSourceSubProtocolOverride, plugin_name, profile, Region, SecretAccessKey, SessionToken, socketTimeout, ssl, sslcert, sslfactory, sslkey, sslpassword, sslrootcert, SSLTruststore , SSLTrustStorePath, tcpKeepAlive, TCPKeepAliveMinutes, unknownLength

  1. The tasklet is unable to execute against Snowflake. The JDBC connection has a user name, so not sure why this is an error:

ERROR taskExecutor-3 org.ohdsi.webapi.cohortdefinition.CleanupCohortTasklet - [] - Error deleting results for cohort: 992, cause: Could not get JDBC Connection; nested exception is net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver internal error: missing user name for opening session.

  1. I've run the deletes from https://github.com/OHDSI/WebAPI/blob/v2.14.0/src/main/resources/resources/cohortdefinition/sql/cleanupResults.sql manually with the same JDBC connection details without issue.
Steps to reproduce behavior
  1. Create and generate a cohort
  2. Delete it
  3. View webapi logs
  4. Also you can see the cohort records still exist in the appropriate CDM results schemas

Tagging @konstjar

Lingua principale
Java
Stelle
153
Fork
187
Merge medio
2g 12h
PR unite (30g)
13

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OHDSI/WebAPI

Tutte le issue di OHDSI/WebAPI

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.