[MCOL-1400] update pdi data adapter to use explicit mcsapi version numbers Created: 2018-05-08  Updated: 2023-10-26  Resolved: 2018-05-18

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.1.4
Fix Version/s: 1.1.5

Type: Bug Priority: Major
Reporter: Jens Röwekamp (Inactive) Assignee: David Thompson (Inactive)
Resolution: Fixed Votes: 1
Labels: None

Sprint: 2018-10

 Description   

If multiple mcsapi's are installed during built of the PDI plugin, it can be that incompatible / wrong java libraries and native libraries are bundled with the PDI plugin.

To resolve this mcsapi should be included as git submodule in the PDI plugin.



 Comments   
Comment by Jens Röwekamp (Inactive) [ 2018-05-09 ]

mcsapi added as git submodule and pdi plugin instructed to use libraries from it.

changed version to 1.1.5

tested with a simple insertion on Ubuntu 16.04 and CentOS 7.

Comment by Andrew Hutchings (Inactive) [ 2018-05-09 ]

This will cause problems with RPM and DEB packaging (if we are going to do that for PDI). Wouldn't a version check be more prudent?

Comment by Jens Röwekamp (Inactive) [ 2018-05-09 ]

Oh I didn't know about that.

Sure version checking should do the job as well.

We only have to ensure that we can map the shared libraries to the Java libraries.

I am not aware if there is a ldd like function to get the version numbers of the shared libraries for mapping.

Otherwise, hashing would do the job. We could for example store the dependent hashes (of the shared C libraries) in libjavamcsapi.jar's Manifest.

Comment by Jens Röwekamp (Inactive) [ 2018-05-10 ]

hashes for the shared libraries don't work as the libraries are changed during the installation (Set runtime path...), so we need a different metric for comparison.

Any suggestions?

Comment by Andrew Hutchings (Inactive) [ 2018-05-10 ]

The C++ API .so file should be versioned in a way that it will create symlinks for its specific version. If you use the full path to the library at link time it will only link with that version. If you don't have that specific version installed it will complain about a missing library at execution time.

Comment by Jens Röwekamp (Inactive) [ 2018-05-11 ]
  • changed mcsapi to include version number as appendix for java libraries
  • added symlinks to the base library name for downward compatibility
  • changed pdi plugin to use mcsapi's java libraries of version equal to pdi plugin version

— for testing —

  • run buildbot (regression suite) to check if mcsapi changes have any unintended impact on any dependent project
  • try to build pdi plugin with mcsapi version lower than pdi plugin version (should fail)
  • build pdi plugin with mcsapi version equal to pdi version on CentOS 7 and Ubuntu 16.04 and manually run the in repository included test (test/test.kjb) in PDI to verify that the pdi plugin works as expected
Generated at Thu Feb 08 02:28:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.