-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance improvement for tests with small spatial test data sets [draft] #76
Comments
We have research on the BaseX documentation, about the database creation option Applying this change would cause all the unit test to fail when executing Additionally, this option can only be activated when recreating the database, which can't be done on runtime. It would be needed to create a second database, and rewire it to the rest of the components to use this auxiliary in-memory database. Also, a method to move the test results from the in-memory database to the main storage service should be put in place, to keep the consistency, and generate the XML representation on the file system. |
Since the idea is to speed up the tests, the change would be made in the test driver -and not in the data storage.
Correct, which is no problem when creating the databases for new test objects.
Please have a closer look at the test driver. |
We added the MAINMEM option on the class constructor etf-bsxtd/src/main/java/de/interactive_instruments/etf/testdriver/bsx/partitioning/DatabasePartitioner.java in the BaseX TestDriver, as you can see in this code snippet
For testing purposes, we built this jar separatedly and included it on the WAR file of the webapp. The TestDriver is loaded correctly on the ETF startup. We create a new TestRun with the TestSuite https://github.com/inspire-eu-validation/ets-repository/blob/v1.0.8/metadata/2.0/common/ets-md-common-bsxets.xml . This TestRun ends abruptly, generates a TestReport with this message On the TestRun log, we only find this information
On the ETF log we don't find anymore information on this message
Looking through the BaseX documentation, the
But the results are still the same. If you could share any insight on how to proceed with this issue, it will be very helpful. |
Please use a debugger to determine where this exception comes from. |
After connecting the debugger to an ETF instance running locally, we found the exception came from the DatabasePartitioner class. The error was in the creation of the database index with the option FullText set to True. In https://github.com/BaseXdb/basex/blob/89059c609f582b20aad4283dbb85fef8dbe90548/basex-core/src/main/java/org/basex/data/MemData.java#L93 , as you can see, if the FullText index is activated, it throws a NO_MAINMEM error. We changed this property to False, and after this change, the Test proceeded past the index drop. But then again we found another exception on the execution of the TestSuit. In this case, the exception came from https://github.com/BaseXdb/basex/blob/f7a5492c46d55e1c1f58df24b8ed9567c176e8c1/basex-core/src/main/java/org/basex/core/cmd/Open.java#L92 , and the message shown on the application is
We need to keep digging on this to check where this comes from. |
ETF Improvement Proposal (EIP)
Background and Motivation:
It takes some time to start the tests, also because the hard disk must be accessed to write index structures.
Proposed change
Small spatial data sets could be tested in-memory.
It should be possible to configure a limit for the data set size. If the data set size is below the limit and the memory utilisation is in a non-critical status (at least the size of the data set is free in RAM and is occupied to a maximum of 50 %), the test is executed in-memory.
Alternatives
Funding
Additional information
The text was updated successfully, but these errors were encountered: