Commit Graph

25 Commits

Author SHA1 Message Date
Don Anderson
2f23a5e4e6 WT-2347 Added java tests for config schema formats.
This corresponds to Python test_config06 and fixes in WT-1517.
2016-01-24 07:39:50 -05:00
Keith Bostic
344a714c3d Upgrade copyright notices from 2015 to 2016. 2016-01-01 16:37:39 -05:00
Don Anderson
bf03218d4c The basic PackTest does positive/negative numbers, so needs to
use 'q' (signed format).
2015-07-13 13:51:01 -04:00
Don Anderson
dade574129 WT-1985. Added teardown() call so multiple tests don't fail. 2015-07-13 13:50:05 -04:00
Don Anderson
d8c99da40d WT-1985. Modified test to add to a table with an index,
and report better messages on test failures,
2015-07-13 13:44:36 -04:00
Don Anderson
38f4c2ca01 WT-1985. Added two more comprehensive packing tests, based on test/suite tests. 2015-07-13 10:35:17 -04:00
Don Anderson
df85488407 WT-1964. For Java, handle cases where a session or cursor is closed
when the thread that open it no longer exists.  Add tests to kill
threads that have open cursors and sessions.
2015-06-26 15:52:35 -04:00
Don Anderson
e038dc447e WT-1963. Refactored Java's next/prev/search/search_near, and modified
so they do not get the key/value when there is no format.
2015-06-12 13:52:01 -04:00
Keith Bostic
1f9098871a Copyright notices: add MongoDB, update to 2015. 2015-01-04 14:07:56 -05:00
Don Anderson
f7b316517d Added java async tests that open many connections. refs #1332.
Changed async test retres after EBUSY to use exponentially longer retries,
to guarantee successful runs.
2014-11-07 15:15:07 -05:00
Don Anderson
c20b47ffb7 Added test for RollbackException. refs #1295. 2014-10-30 09:22:50 -04:00
Don Anderson
8dc722e1bd Added a minimal ExceptionTest for java. 2014-10-23 11:19:36 -04:00
Don Anderson
0fafbdd0c8 Fixes for Java async stability and performance.
Cache field ids and method ids for all async operations.  Invalidate
unpackers by setting fields, rather than calling a method to do it.

Use javaClose to invalidate the swigCptr for a AsyncOp at the end of
the callback.  Any use of an AsyncOp after its lifetime has ended will
give a NullPointerException.

Declare that new_async_op throws WiredTigerException, which happens
when there are no more slots available.

Added a test with a million items that typically does no pauses when
creating ops, but catches WiredTigerException and retries with a short
sleep.
2014-05-13 22:20:18 -04:00
Don Anderson
8893d57383 KNF fixes and comment typo.
Name async_new_op async_flush using underscore (not camelcase) convention.
2014-05-13 13:19:52 -04:00
Don Anderson
2bf916541f Support async operations in Java. refs #933.
- Created a real async handler for java allowing callbacks
  into java code.  Code to be registered must implement the
  new AsyncCallback interface.
- Renamed classes/methods to Java-ish names.
- Fixes to support 'this' removal for AsyncOp.
- Java's cursor ops, like 'insert' set up the value unpackers
  after insert completes.  For AsyncOp, we take a different
  approach, and invalidate the unpacker when the op completes,
  letting the value be fetched when needed.
- Added new test AsyncTest that tests doing different numbers of
  async ops with different parameters, and also with different types
  of keys/values.
2014-05-11 15:09:40 -04:00
Keith Bostic
5b509b7220 Update copyright notices for 2014.
Move lang/java and lang/python into the public domain.
2014-01-07 10:30:12 -05:00
Don Anderson
29aaec0c9f Null out closed handles in Java, and detect nulled handles on use. refs #485.
As reported in #485, when a conn/session is closed, any subordinate
open cursors and sessions have dangling handles that refer to freed
memory.  But also, if a conn/session/cursor handle is closed, that
handle may still be referenced in Java though it references freed
memory.

This commit uses the event handler for close calls to capture the first
case, and makes explicit calls at the close site for the second case.
For each case, a close will set the Java side 'swigCPtr' for each associated
object being closed to 0.

For detection, typemaps effectively check an arg's swigCPtr to see
if the object has been previously closed.  Special cases, like when
a NULL handle is permitted in the API, are accounted for.

Some details:
  - WT_HANDLE_NULLABLE() and WT_HANDLE_CLOSED() mark points in the API
    (wiredtiger.in) where handles may be used as null and where
    handles are closed.  This are not exposed to doxygen.
  - lang_private fields have been added to WT_CONNECTION_IMPL,
    WT_SESSION_IMPL and WT_CURSOR to keep a handle to the
    associated java object, needed at the time of the close().
2013-11-18 13:29:15 -05:00
Alex Gorrod
b87a9ef104 Add file I forgot. 2013-10-29 08:45:40 +11:00
Alex Gorrod
1625a33985 Add a test case for Java auto close feature. 2013-10-25 15:41:30 +11:00
Alex Gorrod
ed3d9ff846 Add a test case for Java cursor issue refs #493 2013-03-26 12:54:39 +11:00
Alex Gorrod
12ea0e5961 Fix copyright notices in Java source code. 2013-02-19 18:40:27 +11:00
Alex Gorrod
39150c640e Update Java Cursor API naming to reflect ByteArray semantics.
Also update documentation, to use Doxygen and @copydoc where possible.
Not yet tied into s_docs.
2013-02-19 17:06:41 +11:00
Alex Gorrod
52d37a140b Update Java cursors to use packing code. Also enhance JUnit usage. 2013-02-13 19:14:40 +11:00
Alex Gorrod
19fed99760 Update Java structure packing implementation.
Add a first JUnit test case, and associated autoconf files.
2013-02-12 21:00:49 +11:00
Alex Gorrod
12c649b0f4 Add a Java implementation of packed formats.
Also add a test case and update the layout of the Java build.
2013-02-08 14:15:19 +11:00