Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046474Retail ModulesWeb POSpublic2021-05-04 08:292021-06-07 17:24
alostale 
gorka_gil 
immediatemajorhave not tried
closedno change required 
5
 
 
Production - Confirmed Stable
2020-04-06
RR20Q3
https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/0cdcfa9dc0f23cc2801d85ec9bc39ae2157ac705 [^]
No
0046474: duplicated data fetched by incremental refreshes during the same session
All the incremental refreshes triggered for the same session check the same updated timestamp. This causes the same data to be sent repeatedly while the session is alive.
1. Configure incremental refresh to be triggered every 1 minute
2. Log in Web POS
3. In backoffice update a product that will be fetched as part of the store's assortment
4. Wait till next refresh occurs
   -> OK: that refresh fetches the updated product. Check also the request lastUpdated param value
5. Wait till next refresh occurs
   -> FAIL: the refresh includes the previous product again. The request has lastUpdated param with the same value than in previous refresh
No tags attached.
caused by feature request 0043657 closed Sandrahuguet Masterdata IndexedDB - Phase 1 
Issue History
2021-05-04 08:29alostaleNew Issue
2021-05-04 08:29alostaleAssigned To => Retail
2021-05-04 08:29alostaleTriggers an Emergency Pack => No
2021-05-04 08:30alostaleRelationship addedcaused by 0043657
2021-05-04 08:32alostaleRegression level => Production - Confirmed Stable
2021-05-04 08:32alostaleRegression date => 2020-04-06
2021-05-04 08:32alostaleRegression introduced in release => RR20Q3
2021-05-04 08:32alostaleRegression introduced by commit => https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/0cdcfa9dc0f23cc2801d85ec9bc39ae2157ac705 [^]
2021-06-07 12:55gorka_gilAssigned ToRetail => gorka_gil
2021-06-07 17:24gorka_gilNote Added: 0129154
2021-06-07 17:24gorka_gilStatusnew => closed
2021-06-07 17:24gorka_gilResolutionopen => no change required

Notes
(0129154)
gorka_gil   
2021-06-07 17:24   
Tested now and is working correctly.

The confusion was probably because the way of work of the background refresh.

There is 3 refresh timers:
- full
- incremental
- force

If you configure the incremental each minute and the force each 5 mins,
then will execute the requests of changes each min, with the same data,
if there is a new product will retrieve the same product in each request.

Till the force timer that introduces really the data in the db, from that moment will not retrieve that product. Alternatively making a new order will also save the data in the db.

This is the designed way to work. The first timer gets the data from the backend and saves into ram, and the second timer saves into db. And for do the request to the backend is used the last updated time of the db, since the variable to store in ram is the same, so if a second request happens before save into db, we will lost the data of the previous request.