code change · fixAdministration & Setupofficial - Microsoftreviewed - checked by Opus

#13598 Fix concurrent initialization of My Notifications

My Notifications no longer fails with an 'already exists' error when two sessions of the same user initialize the same notification row at once. The losing session reloads the row the winning session inserted and does not overwrite its saved settings.

Pull request · merged into main (BC30) on 2026-11-06 by darjoo · 3 files (+170 -6), 1 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Fixed race condition where concurrent sessions would both find no notification row and attempt to insert, causing the second session to fail with ‘already exists’ error
  • Implemented shared insert-or-get operation for all three default-insert helpers to handle concurrent initialization gracefully
  • Added five deterministic regression tests covering all three table helpers and the platform get/set paths with competing row insertions
  • Solution avoids locks or commits while ensuring the notification page opens successfully for all concurrent sessions
  • Covers platform notification status initialization and table-specific/filtered default helpers
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#657048
  • Labels: Team: Integrations
  • Systems: administration
  • From the description: “Two sessions of the same user can both find no notification row on first use and then race to insert it.”

No source states these links: they share an object, a model read them, or a person found the same subject.

  • Schedule jobs to run automatically — possibly related: Job Queue and My Notifications concurrent initialization issues related to concurrent data access handling. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).