sap-commerce-db-sync icon indicating copy to clipboard operation
sap-commerce-db-sync copied to clipboard

The job incrementalMigrationJobNonLP is stuck in RUNNING state

Open premkumar316 opened this issue 8 months ago • 5 comments

The incremental cronjob incrementalMigrationJobNonLP is stuck in the running state. Below messages are getting logged continuously:

INFO [incrementalMigrationJobNonLP::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] [AbstractMigrationJobPerformable] {} Cron job request to abort: false

INFO [incrementalMigrationJobNonLP::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] [AbstractMigrationJobPerformable] {} Cron job status: RUNNING

The job used to run fine earlier. Suddenly I am seeing this issue now.

premkumar316 avatar Mar 19 '25 11:03 premkumar316

I think I found the issue. I found a migration thats been running from 13-Mar-2025. It seems that this migration got stuck for some reason.

Image

Is it ok that I can delete this entry?

premkumar316 avatar Mar 20 '25 06:03 premkumar316

Maybe this will help you.

lnowakowski-sap avatar Mar 20 '25 06:03 lnowakowski-sap

@lnowakowski-sap Thanks for sharing the solution. I have a question on the same.

The groovy databaseMigrationService.markRemainingTasksAborted(migrationContext, 'MIGRATION_ID') will update the entry from table TABLECOPYTASKS. The issue that I am facing is due to the entry in TABLECOPYSTATUS. Sorry, that I forgot to mentions this before. Is there a way to update the blocking entry in this table:

Image

premkumar316 avatar Mar 20 '25 08:03 premkumar316

@lnowakowski-sap Can you please look into my above comment when you get time?

premkumar316 avatar Mar 21 '25 07:03 premkumar316

There is a trigger in DB for update events on *_TABLECOPYTASKS table, hence change in it will also update overall status of migration in other tables.

lnowakowski-sap avatar Mar 21 '25 09:03 lnowakowski-sap