Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036742 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | major | have not tried | 2017-08-29 15:46 | 2017-09-02 23:45 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | open | Fixed in Version | RR17Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 4b7ec6d22152 | ||||
Projection | none | ETA | none | Target Version | RR17Q4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | mtaal | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036742: PartialExclusionWriterFilterAdapter only restores columns but not row data in afterwrite | |||||||
Description | In the PartialExclusionWriterFilterAdapter classs, in the beforeWrite method [1] both the rowData and the columns by table are corrected for excluded columns. However, in the afterwrite [2] only the columns are restored. Also now only rowData is corrected but also oldData should be corrected and restored. [1] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/9887808d7c40/src/org/openbravo/replication/symmetricds/extensions/PartialExclusionWriterFilterAdapter.java#l92 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/9887808d7c40/src/org/openbravo/replication/symmetricds/extensions/PartialExclusionWriterFilterAdapter.java#l107 [^] | |||||||
Steps To Reproduce | Check a table with partially excluded columns Create a writer filter adapter which does getColumnIndex Check that getColumnIndex returns the wrong value | |||||||
Proposed Solution | Keep the original rowData and oldData also in the context and restore in afterwrite. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0098709) hgbot (developer) 2017-08-29 16:27 |
Repository: erp/pmods/org.openbravo.replication.symmetricds Changeset: 4b7ec6d22152fd28511654457a09334ba3c5dd22 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Tue Aug 29 16:26:55 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/4b7ec6d22152fd28511654457a09334ba3c5dd22 [^] Fixes issue 36742: PartialExclusionWriterFilterAdapter only restores columns but not row data in afterwrite Store also rowData and oldData in context and restore in afterwrite --- M src/org/openbravo/replication/symmetricds/extensions/PartialExclusionWriterFilterAdapter.java --- |
(0098750) AugustoMauch (manager) 2017-08-31 11:28 |
I get this error when synchronizing an INSERT done on a table that has a column excluded partially: java.lang.NullPointerException at java.util.Objects.requireNonNull(Objects.java:203) at java.util.Arrays$ArrayList.(Arrays.java:3813) at java.util.Arrays.asList(Arrays.java:3800) at scala.actors.threadpool.Arrays.asList(Unknown Source) at org.openbravo.replication.symmetricds.extensions.PartialExclusionWriterFilterAdapter.excludeColumns(PartialExclusionWriterFilterAdapter.java:199) The problem seems to be here [1]. In INSERTS CsvData.OLD_DATA will be null, and in DELETES CsvData.ROW_DATA will be null, so in both cases the exception will be thrown because Arrays.asList does not accept null values. [1] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/diff/4b7ec6d22152/src/org/openbravo/replication/symmetricds/extensions/PartialExclusionWriterFilterAdapter.java#l1.66 [^] |
(0098773) hgbot (developer) 2017-09-01 12:30 |
Repository: erp/pmods/org.openbravo.replication.symmetricds Changeset: d571640791f01e577dc8095a1844b7defdfd0ca2 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Fri Sep 01 12:29:36 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/d571640791f01e577dc8095a1844b7defdfd0ca2 [^] Fixes issue 36742: Refactors WriterFilterAdapter and prevents NPE The following changes have been done: - Clean up - refactors: * Code to obtain the list of partially excluded columns extracted to new method * Gather together the code that stores the back ups of the original table and data (row data and old data) - Prevent NPE: Only invoke Arrays.asList(array) if the array is not null --- M src/org/openbravo/replication/symmetricds/extensions/PartialExclusionWriterFilterAdapter.java --- |
(0098781) mtaal (manager) 2017-09-02 23:45 |
Reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2017-08-29 15:46 | mtaal | New Issue | |
2017-08-29 15:46 | mtaal | Assigned To | => mtaal |
2017-08-29 15:46 | mtaal | Triggers an Emergency Pack | => No |
2017-08-29 16:26 | mtaal | Review Assigned To | => AugustoMauch |
2017-08-29 16:27 | hgbot | Checkin | |
2017-08-29 16:27 | hgbot | Note Added: 0098709 | |
2017-08-29 16:27 | hgbot | Status | new => resolved |
2017-08-29 16:27 | hgbot | Resolution | open => fixed |
2017-08-29 16:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/4b7ec6d22152fd28511654457a09334ba3c5dd22 [^] |
2017-08-31 11:28 | AugustoMauch | Note Added: 0098750 | |
2017-08-31 11:28 | AugustoMauch | Status | resolved => new |
2017-08-31 11:28 | AugustoMauch | Resolution | fixed => open |
2017-09-01 12:30 | hgbot | Checkin | |
2017-09-01 12:30 | hgbot | Note Added: 0098773 | |
2017-09-01 12:30 | hgbot | Status | new => resolved |
2017-09-01 12:30 | hgbot | Resolution | open => fixed |
2017-09-01 12:30 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/4b7ec6d22152fd28511654457a09334ba3c5dd22 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/d571640791f01e577dc8095a1844b7defdfd0ca2 [^] |
2017-09-01 12:30 | AugustoMauch | Review Assigned To | AugustoMauch => mtaal |
2017-09-01 12:30 | AugustoMauch | Status | resolved => new |
2017-09-01 12:30 | AugustoMauch | Resolution | fixed => open |
2017-09-01 12:30 | AugustoMauch | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/d571640791f01e577dc8095a1844b7defdfd0ca2 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/4b7ec6d22152fd28511654457a09334ba3c5dd22 [^] |
2017-09-01 12:30 | AugustoMauch | Status | new => scheduled |
2017-09-01 12:31 | AugustoMauch | Status | scheduled => resolved |
2017-09-02 23:45 | mtaal | Note Added: 0098781 | |
2017-09-02 23:45 | mtaal | Status | resolved => closed |
2017-09-02 23:45 | mtaal | Fixed in Version | => RR17Q4 |
Copyright © 2000 - 2009 MantisBT Group |