search cancel

Per Period Metrics: 'An Exception occurred...' due to Deadlock with Time Slicing (DE61044)

book

Article ID: 215686

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

In the Modern User Experience Per Period Metrics (Time Scale Value (TSV)), error: An Exception occurred while trying to update an object instance assignment is generated when the Time Slicing job is run and updates are made to Per Period Metrics at the same time. This error can happen if updating cells one by one, copying and pasting data, or clicking refresh using Group By. When the error happens, some of the data entered is reverted back to the previously set value. This is more noticeable if the time slicing job takes 30 seconds or more to process. 

STEPS TO REPRODUCE: 

  1. Schedule the Time Slicing job to run every minute
  2. Create a project with about 100 assignments
  3. Go to the Assignments module for the project in the Modern UX
  4. In View Options, set the following:
    • Select Per-Period Metrics = ETCs; Actuals
    • Periods = Months
    • Start Period = 2021-04
    • Finish Period = 2022-04
  5. Add a Group by for Task Name to see the issue happen during refresh (though the issue is reproducible without Group By in other scenarios.)
  6. Make a large number of data changes (Example: Copy '55' into ten ETC rows for two periods)
  7. Wait for the Time Slicing job to start processing and click Refresh on the Per Period Metrics page at the same time

Expected Results: Refresh completes successfully and data changes are saved post refresh

Actual Results: Intermittently, a Toast error message: An Exception occurred while trying to update an object is generated. Additionally, some of the data reverts back to the previous values.

Note: This issue also happens while copying and pasting data into per period metrics cells and also trying data cell by cell.

Environment

Release : 15.9.2

Component : CLARITY PROJECT MANAGEMENT

Database: MSSQL Server

Cause

This is caused by: DE61044 related to a deadlock issue when the time slicing job and per period metrics are being updated at the same time. Excerpt of error seen in app-ca.logs:

ERROR 2021-05-21 09:31:55,509 [http-nio-1577-exec-456] rest.validation (clarity:admin:..::PPM_REST_API) com.niku.union.odf.exception.ODFServiceException: An exception occurred while trying to update an object instance assignment

Caused by: com.niku.union.persistence.PersistenceDeadlockException: SQL error code: 1205Error message: [CA Clarity][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Resolution

This issue is fixed in 15.9.2 patch 1 and 15.9.3 as DE61044

Workaround: Schedule the Time Slicing job to run less frequently to help avoid the issue.

Additional Information

See also: