Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038903Retail ModulesStoreServerpublic2018-07-05 10:492018-08-27 15:42
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
RR18Q3.1 
AugustoMauch
No
0038903: Symmetric DS writer adapters should be careful with using DAL to read additional information
Symmetric DS uses its own connection to write the data to the database. In our writer filter adapters we sometimes use the DAL to read additional information. the DAL uses its own connection. So the DAL does not yet see the data Symmetric DS is inserting/updating at the same time. So the DAL can only be used on data which is surely already there from before (for example currency codes).

An example which can go wrong is here [1] as the BP might be imported into the store together with the invoice.

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/tip/src/org/openbravo/retail/storeserver/synchronization/CustomerCreditWriterFilterAdapter.java#l88 [^]
Use Symmetric DS api to read data from the database.
Also check other writer filter adapters for this pattern.
No tags attached.
Issue History
2018-07-05 10:49mtaalNew Issue
2018-07-05 10:49mtaalAssigned To => mtaal
2018-07-05 10:49mtaalTriggers an Emergency Pack => No
2018-07-05 11:02mtaalNote Added: 0105633
2018-07-05 12:50hgbotCheckin
2018-07-05 12:50hgbotNote Added: 0105636
2018-07-05 13:17hgbotCheckin
2018-07-05 13:17hgbotNote Added: 0105638
2018-07-05 13:17hgbotStatusnew => resolved
2018-07-05 13:17hgbotResolutionopen => fixed
2018-07-05 13:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/9e4127cb94d374e6d961009c44248023ac29c889 [^]
2018-07-05 13:18mtaalReview Assigned To => AugustoMauch
2018-07-09 12:02hgbotCheckin
2018-07-09 12:02hgbotNote Added: 0105673
2018-08-08 11:06hgbotCheckin
2018-08-08 11:06hgbotNote Added: 0106184
2018-08-08 11:06hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/9e4127cb94d374e6d961009c44248023ac29c889 [^] => http://code.openbravo.com/erp/devel/pi/rev/e17a08d06f29cbe5ddc31982041be20e366ae596 [^]
2018-08-08 11:08AugustoMauchNote Deleted: 0106184
2018-08-09 17:22hudsonbotCheckin
2018-08-09 17:22hudsonbotNote Added: 0106267
2018-08-20 08:49AugustoMauchNote Added: 0106397
2018-08-20 08:49AugustoMauchStatusresolved => closed
2018-08-20 08:49AugustoMauchFixed in Version => RR18Q3.1
2018-08-27 11:37hgbotCheckin
2018-08-27 11:37hgbotNote Added: 0106491
2018-08-27 11:40hgbotCheckin
2018-08-27 11:40hgbotNote Added: 0106492
2018-08-27 11:40hgbotStatusclosed => resolved
2018-08-27 11:40hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/e17a08d06f29cbe5ddc31982041be20e366ae596 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/797b52363239c63f00e185dc46d8e815750e7ab8 [^]
2018-08-27 11:41AugustoMauchNote Deleted: 0106492
2018-08-27 11:41AugustoMauchStatusresolved => closed
2018-08-27 14:21AugustoMauchNote Deleted: 0106491
2018-08-27 15:42hudsonbotCheckin
2018-08-27 15:42hudsonbotNote Added: 0106499

Notes
(0105633)
mtaal   
2018-07-05 11:02   
https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/tip/src/org/openbravo/replication/symmetricds/extensions/AdProcessRunWriterFilterAdapter.java#l75 [^]
--> DAL is being used but process request is created beforehand and process run is not critical to miss

CustomerCreditWriterFilterAdapter --> see link in issue, needs to be changed

https://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/file/tip/src/org/openbravo/retail/giftcards/synchronization/GiftCardCurrentAmountWriterFilterAdapter.java#l81 [^]
--> yes uses DAL, is suspect, needs to change, but needs to be done at next snapshot

No DAL usage:
BPartnerStoreWriterFilterAdapter
ClearExternalReferencesWriter
DocumentSequenceWriterFilterAdapter
FinancialAccountBalanceWriterFilterAdapter
GiftCardCurrentAmountInitializer
ImportEntryWriterFilterAdapter
InventoryWriterFilterAdapter
ModuleVersionRecomputedWriterFilterAdapter
OfflineIncomingSynchronizationPreventer
OrderDocumentNoWriterFilterAdapter
PartialExclusionWriterFilterAdapter
PreferenceWriterFilterAdapter
PreventInsertingArchivedImportEntries
PreventProductCharacteristicDuplicates
StoreServerIncomingSynchronizationPreventer
VersionCacheResetWriterFilterAdapter
(0105636)
hgbot   
2018-07-05 12:50   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: dc143b8a3bee6fc48ae2f650e8ea1fa5da3b71ad
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jul 05 12:50:49 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/dc143b8a3bee6fc48ae2f650e8ea1fa5da3b71ad [^]

Related to issue 38903: Symmetric DS writer adapters should be careful with using DAL to read additional information
Use Symmetric DS connection for reading volatile information

---
M src/org/openbravo/retail/storeserver/synchronization/CustomerCreditWriterFilterAdapter.java
---
(0105638)
hgbot   
2018-07-05 13:17   
Repository: erp/pmods/org.openbravo.retail.giftcards.synchronization
Changeset: 9e4127cb94d374e6d961009c44248023ac29c889
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jul 05 13:17:24 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards.synchronization/rev/9e4127cb94d374e6d961009c44248023ac29c889 [^]

Fixes issue 38903: Symmetric DS writer adapters should be careful with using DAL to read additional information
Handle the case that the gift card instance is not yet there

---
M src/org/openbravo/retail/giftcards/synchronization/GiftCardCurrentAmountWriterFilterAdapter.java
---
(0105673)
hgbot   
2018-07-09 12:02   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 0189bad374c39fa5e1b274d9732bfd5f71d0b853
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Jul 09 12:02:32 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/0189bad374c39fa5e1b274d9732bfd5f71d0b853 [^]

Related to issue 38903: Symmetric DS writer adapters should be careful with using DAL to read additional information
Solve build error because of warning

---
M src/org/openbravo/retail/storeserver/synchronization/CustomerCreditWriterFilterAdapter.java
---
(0106267)
hudsonbot   
2018-08-09 17:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/eed070ea968c [^]
Maturity status: Test
(0106397)
AugustoMauch   
2018-08-20 08:49   
Code reviewed and verified
(0106499)
hudsonbot   
2018-08-27 15:42   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/437af0fa8970 [^]
Maturity status: Test