[MCOL-1199] Forward Bulk Write API C++ Exceptions to Java Created: 2018-02-05  Updated: 2023-10-26  Resolved: 2018-02-07

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.1.2
Fix Version/s: 1.1.3

Type: New Feature Priority: Critical
Reporter: Jens Röwekamp (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2018-03

 Description   

Occurring C++ exceptions aren't forwarded to Java. Therefore, in case a C++ exception is thrown, the Java program terminates.



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

Created a subclass of java.lang.RuntimeException called ColumnStoreException to which a C++ ColumnStoreError is forwarded to. Added the related glue code in javamcsapi.i.

Added a simple test to the test suite that tries to access a nonexistent table and therefore throws a ColumnStoreException.

Exceptions of type java.lang.RuntimeException are unchecked. If we need to use checked Exceptions we have to specify each C++ function where a ColumnStoreError is thrown. Haven't found an easy way to do this automated with Swig. Therefore, I chose java.lang.RuntimeException.

What do you think?

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

Looks good to me. If we figure out a better way later we can change it.

For QA: There is a test in the API's test suite for this.

Comment by Daniel Lee (Inactive) [ 2018-02-07 ]

Build verified: Github source
API
[root@localhost mariadb-columnstore-api]# git show
commit c1b2a3c972d868806f29469541db52cb43ffdd45
Merge: 53fcb95 17fa76f
Author: David Thompson <dthompson@mariadb.com>
Date: Tue Feb 6 10:05:44 2018 -0800
Merge pull request #49 from mariadb-corporation/MCOL-1200
MCOL-1200 C++ Exceptions of type ColumnStoreError are now forwarded t…
MCS 1.1.3-1
/root/columnstore/mariadb-columnstore-server
commit e5499e513d88a3dfefbe9a356e20a1bceb1bde38
Merge: 99cdb0a 4840a43
Author: david hill <david.hill@mariadb.com>
Date: Wed Jan 31 16:53:52 2018 -0600
Merge pull request #92 from mariadb-corporation/MCOL-1152
MCOL-1152: Change the debian package names.
/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit ffcc4e94ccd07b6bbdfc47531c4c2f065f3fab47
Merge: 05431bf 3fb5dde
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Mon Feb 5 22:37:05 2018 -0600
Merge pull request #398 from mariadb-corporation/statuscontrol-fix
add ProcStatusControl to postConfigure setup
Made build and performance build-in test suite.

Generated at Thu Feb 08 02:26:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.