What's New: Concurrency in Warehousing (2024 release wave 1)
Concurrent warehouse posting in Business Central 25: multiple users can post warehouse entries at the same time, using number sequences instead of table locks. Covers the insert record function, sift bucket numbers, the on init event for warehouse entries, and a feature key that is on by default.
- Introduction to warehouse posting
- How warehouse posting works until now
- New concurrent posting approach in BC25
- Insert record function and sift bucket handling
- Drill down filtering and event hooks
- Feature key and implementation considerations
Overview
The video explains how warehouse posting worked until now: one user could post at a time, with a register such as the warehouse register and then its entries, and entry numbers were found through locking. In BC25, multiple users can post at the same time, and entry numbers come from a number sequence.
It then covers the changes developers need to know about. A new insert record function handles cases where someone has posted the old way with a lock table, and resets the number sequence if insertion conflicts. A semi-random sift bucket number lowers lock contention on sift indexes. Drill down filters on the register number, and an on init event lets extensions add logic before insertion. A feature key controls the behavior and can be turned off.
Key points
- Until now only one user could post warehouse entries at a time; BC25 allows multiple users to post concurrently.
- Entry numbers are assigned through a number sequence instead of locking the table and finding the last entry.
- Warehouse entries get a new field that records which warehouse register they belong to.
- A new insert record function replaces simple inserts. It copes with old-style posting that still uses lock table and find last, and resets the number sequence if the insert does not succeed.
- Warehouse entries get a semi-random sift bucket number between zero and four. This reduces the risk of sift index lock contention when two users post for the same item and location, but does not remove it.
- Drill down from the register also filters on register number: either zero (entries from before version 25) or the register number. This was done to avoid expensive upgrades.
- The on init event for warehouse entries runs after initialization and before insertion, and passes the entry number and the warehouse register. Extensions that use it to insert extra entries may need to implement the same pattern.
Features
Every feature below: status not stated.
| Feature | At |
|---|---|
| Concurrent warehouse entry posting | 1:29 |
| Number sequences for entry numbering | 1:29 |
| Insert record function | 2:23 |
| Sift bucket number assignment | 3:02 |
| On init event for warehouse entries | 4:03 |
| Concurrent posting feature key | 4:39 |
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- table 7313 “Warehouse Register” at 0:28
- table 7312 “Warehouse Entry” at 0:48
- table 5769 “Warehouse Setup” at 4:59
Quotes
- 0:28 “only one user can post at the time and you usually have a register like a warehouse register and then some entries”
- 1:29 “in bc25 we will allow multiple users at the same time to post and we’ll do that by using number sequences”
- 2:02 “we also need to inform the warehouse entry to which uh register it belongs to so there’s also a new field for warehouse”
- 2:23 “we call a new function that we call insert record and that’s because maybe someone else has posted old style with a lock table”
- 3:02 “if you have a combination of values in a sift index for instance item number and location and two users insert Warehouse entries to”
- 3:22 “We additionally filter on the register number so either it’s zero because it’s from before 25 or it is the reg number”
- 4:03 “we have an event that’s called on in it something that we call after we have initiated the warehous entry but before we insert”
- 4:39 “there is a feature key that we have enabled by default but you can turn it off and in the code there is a”
Disclaimers in the video
- 1:29 coming-later: in bc25 we will allow multiple users at the same time to post
Presenters (as heard): B Knutsen.
