Public bug reported:

When I execute the code below, a TarantoolException be thrown.

        MetaData metaData = new MetaData();
        metaData.setTablename(metas[0]);
        metaData.setSpace(Integer.parseInt(metas[1]));
        metaData.setFields(metas[2]);
        if(metas.length > 3) {
            metaData.setIndexes(metas[3]);
        }

        TarantoolTemplate template = new TarantoolTemplate(factory);
        template.save(metaData).insertOrReplace();

The save method of TarantoolTemplate can't execute normally. By the way,  the 
object metaData has two special fields: fields and indexes, both of them have a 
string value that is too long. 
fields = 
{"id":"0|Int","product_id":"2|Int","status":"5|Int","token":"4|Str","client_id":"1|Long","version":"3|Str"}
indexes = 
{"PRIMARY":{"columns":["id"],"Non_unique":"0"},"idx_client_prod":{"columns":["client_id","product_id"],"Non_unique":"0"},"client_id_android":{"columns":["client_id","product_id"],"Non_unique":"0"}}

Details of TarantoolException thrown are: Exception in thread "main"
org.tarantool.core.exception.TarantoolException: Illegal parameters,
packet too short (expected a field)

It's because these value of fields is too long result in this problem, is it? 
Expecting reply!

** Affects: tarantool
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Tarantool
Development Team, which is subscribed to tarantool.
https://bugs.launchpad.net/bugs/1169845

Title:
  Illegal parameters, packet too short (expected a field)

Status in Tarantool - an efficient in-memory data store:
  New

Bug description:
  When I execute the code below, a TarantoolException be thrown.

          MetaData metaData = new MetaData();
          metaData.setTablename(metas[0]);
          metaData.setSpace(Integer.parseInt(metas[1]));
          metaData.setFields(metas[2]);
          if(metas.length > 3) {
              metaData.setIndexes(metas[3]);
          }

          TarantoolTemplate template = new TarantoolTemplate(factory);
          template.save(metaData).insertOrReplace();

  The save method of TarantoolTemplate can't execute normally. By the way,  the 
object metaData has two special fields: fields and indexes, both of them have a 
string value that is too long. 
  fields = 
{"id":"0|Int","product_id":"2|Int","status":"5|Int","token":"4|Str","client_id":"1|Long","version":"3|Str"}
  indexes = 
{"PRIMARY":{"columns":["id"],"Non_unique":"0"},"idx_client_prod":{"columns":["client_id","product_id"],"Non_unique":"0"},"client_id_android":{"columns":["client_id","product_id"],"Non_unique":"0"}}

  Details of TarantoolException thrown are: Exception in thread "main"
  org.tarantool.core.exception.TarantoolException: Illegal parameters,
  packet too short (expected a field)

  It's because these value of fields is too long result in this problem, is it? 
  Expecting reply!

To manage notifications about this bug go to:
https://bugs.launchpad.net/tarantool/+bug/1169845/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to