Openbravo Issue Tracking System - Modules
View Issue Details
0055135ModulesOpenbravo Business APIpublic2024-04-09 09:372024-04-09 10:41
adrianromero 
adrianromero 
highmajoralways
closedfixed 
5
 
 
0055135: EDL error using ReadOnly database with Business API events
when EDL is configured to use the ReadOnly db:
Openbravo.properties: bbdd.readonly.url=xxxx

in the flow Send Business API Event, if the synchronization between the primary and the replica nodes is slow, an error is raised (attached the whole error trace):
ERROR org.openbravo.externaldata.integration.process.AsynchronousProcessor - Unexpected error processing item
org.openbravo.base.exception.OBException: Could not export data for record with ID A6FACEAC7AA61347420F98C6BB9A96BF
        at org.openbravo.api.edl.ApiEventItemProcessor.lambda$exportItem$0(ApiEventItemProcessor.java:85) ~[classes/:?]

Executing again, the EDL works

The problem is the ticket was processed but it was not synced yet to the replica db node
. in local env, duplicate the db:
 -> create database miDB2 template miDB;
. configure Openbravo.properties to use a readOnly:
bbdd.readonly.url=jdbc:postgresql://localhost:5432 [^]
bbdd.readonly.sid=miDB2
bbdd.readonly.user=tad
bbdd.readonly.password=tad

. configure to use Send Business API - RETAPCO_OrderCreation

. in POS -> complete a ticket
. in BO -> go to EDL -> edl record was created in error
No tags attached.
related to defect 0054937 closed caristu  EDL error using ReadOnly database with Business API events 
Issue History
2024-04-09 09:37adrianromeroNew Issue
2024-04-09 09:37adrianromeroAssigned To => adrianromero
2024-04-09 09:37adrianromeroIssue generated from0054937
2024-04-09 09:37adrianromeroRelationship addedrelated to 0054937
2024-04-09 09:58hgbotNote Added: 0162962
2024-04-09 10:41hgbotResolutionopen => fixed
2024-04-09 10:41hgbotStatusnew => closed
2024-04-09 10:41hgbotNote Added: 0162966
2024-04-09 10:41hgbotNote Added: 0162967

Notes
(0162962)
hgbot   
2024-04-09 09:58   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/250 [^]
(0162966)
hgbot   
2024-04-09 10:41   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: ff15f5a2ce81380fb502c0d8799195318f9e66aa
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 09-04-2024 08:41:09
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/ff15f5a2ce81380fb502c0d8799195318f9e66aa [^]

Fixes ISSUE-55135: do not use RO pool for single record events

---
M src-test/org/openbravo/api/edl/ApiEventItemProcessorTest.java
M src/org/openbravo/api/edl/ApiEventItemProcessor.java
---
(0162967)
hgbot   
2024-04-09 10:41   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/250 [^]