Reported on wiredtiger-users group by user "Sand Stone":
I am playing with the log cursor sample, ex_log.java. It seems the
example is broken with mongodb-3.4 and develop at least.After fixing the minor sample code issue, there are two main issues:
1. the LSN offset type is changed from long to int.
2. the cursor.search seems always return -31803
I've confirmed it's broken:
com.wiredtiger.examples.ex_log
Exception: com.wiredtiger.db.WiredTigerPackingException: Format mismatch. Wanted: q, got: I
com.wiredtiger.db.WiredTigerPackingException: Format mismatch. Wanted: q, got: I
at com.wiredtiger.db.PackFormatInputStream.checkType(PackFormatInputStream.java:123)
at com.wiredtiger.db.PackInputStream.getLong(PackInputStream.java:221)
at com.wiredtiger.db.Cursor.getKeyLong(Cursor.java:322)
at com.wiredtiger.examples.ex_log.simple_walk_log(ex_log.java:141)
at com.wiredtiger.examples.ex_log.logExample(ex_log.java:363)
at com.wiredtiger.examples.ex_log.main(ex_log.java:374)