Name: [FIX] point_of_sale: add deterministic tiebreaker to limited product loading

State: Killed finished in 413m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #1238

Committer: David Tran

Committer Email: david.tran@tvtmarine.com

Commit: e2f27c741e3cb98eacbf843316550b5eca6ce149

Description:

                                            [FIX] point_of_sale: add deterministic tiebreaker to limited product loading

get_limited_products_loading ordered candidate products by is_favorite, service type, last stock move date and write_date, with no final tiebreaker. When products tie on all of those keys (e.g. non-favorite consumable products with no stock moves created in the same transaction, sharing an identical write_date = transaction_timestamp()), the LIMIT result fell back to PostgreSQL's unspecified physical scan order, making the loaded product set non-deterministic. It surfaced as an intermittent pos_loyalty test_product_loading failure on large installs.

Add product_product.id as a final ascending tiebreaker so limited product loading is stable and reproducible.
                                            

Branch: 18.0

Instance ID: 0

Age:

Up-time: