IBM Support

Known issues for DB2 JSON application development for IBM data servers

News


Abstract

A list of known issues for DB2 JSON application development for IBM data servers, V10.5

Content

Known Issue #1

Ignore the index length if passed to DBCollection.ensureIndex() API as part of the indexSpec.



Problem:

Querying a field with an index return might return incorrect results.

For example, consider the following documents:

{"name" : "Amy"} // name field length = 3
{"name" : "John"} // name field length = 4
{"name" : "Christopher"} // name field length = 11
{"name" : "David"} // name field length = 5

Next, you create an ascending index on the field "name" with the type string and a field length of 10 characters, such as in the following command:

collection.ensureIndex(new BasicDBObject("name", new BasicDBList(1, "$string", 10)));

Now, you run the following query on the index to find all documents that match the field "name" with a value that is greater than "B":

db.collection.find({name:{$gt:"B"}})

In this example, the following result is returned:

{"name" : "John"}
{"name" : "David"}


Note that the query condition above matched three documents, but only returns two. The documents that contain the name "John" and "David" are returned. However, the result should also return the document that contains the name “Christopher".
The reason for not returning "Christopher" in the result set is due to the the index length specified in ensureIndex collection command. Only strings in the name field that are 10 characters or less are returned.
"Christopher" is 11 characters long.

Remedy:

To ignore the index length that is passed to the ensureIndex API for string and binary fields, start Version 1.4 or above of the NOSQL driver.

The result is that:
• the index length of these fields is always set to the default (1024).
• the documents containing an indexed field of type string or binary with values of more than 1024 in length are not indexed and are excluded in the result set. They are excluded even if they match the query's condition.
• inserting string or binary fields of length more than 1024 is permitted by the driver, even if that field has an index on it.

If you run the above query again, the result are returned with all three documents:

{"name" : "John"}
{"name" : "Christopher"}
{"name" : "David"}

Known Issue #2

Shutting down the Wire Listener using the wplistener.(bat/sh) script with the "-shutdown" option does not work.

Problem:

If you start the Wire Listener using the wplistener.(bat/sh) script with the "-registrationFile" option, which also means the Wire Listener is running with authentication on, the "-shutdown" option fails to stop the Wire Listener.

Remedy:

To shut down the Wire Listener, from the command line window in which you started the Wire Listener, issue, press Ctrl-C. This will kill the current active process.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"DB2 Tools - Troubleshooting","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"10.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21671937