You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
POST /v1/cache/readByIndex HTTP/1.1
Host: 10.78.221.224:8086
Content-Type: application/json
Content-Length: 72
{"filter":"RUS","index":"country_list_Alfa3_idx","space":"country_list"}
At handler:
-- Read value from space by index
local function read_value_by_index(self)
log.info('read_value_by_index request: ' .. tostring(self));
log.info('read_value_by_index body: ' .. json.encode(self:json()))
....
local args = self:json()
local space = args.space
local index = args.index
local filter = args.filter
....
log.debug('read_value_by_index: ' .. space .. " " .. index .. " " .. filter)
local value, err = crud.select(space, {{'==', index, filter}}, {timeout = 5}) ---- handlers.lua:421: this row
local response
if err ~= nil then
<------>response = self:render({json = { filter = filter, message = err }})
<------>response.status = 400
elseif #value.rows == 0 then
<------>response = self:render({json = { filter = filter }})
<------>response.status = 404
else
<------>value = get_object(value.metadata, value.rows[1])
<------>log.debug('read_value_by_index value: ' .. json.encode(value))
<------>response = self:render({
<------> json = value
<------>})
end
....
log.info('read_value_by_index response: ' .. json.encode(response))
return response
end
At logs:
{"time": "2021-04-01T10:26:50.334+0300", "level": "INFO", "message": "read_value_by_index body: {\"filter\":\"RUS\",\"space\":\"country_list\",\"index\":\"country_list_Alfa3_idx\"}", "pid": 848 , "cord_name": "main", "fiber_id": 136157, "fiber_name": "http\/10.12.75.136:39966", "file": "\/usr\/share\/tarantool\/tarantool_cache\/app\/roles\/handlers.lua", "line": 413}
{"time": "2021-04-01T10:26:50.336+0300", "level": "INFO", "message": "read_value_by_index response: {\"status\":400,\"body\":\"{\\\"filter\\\":\\\"RUS\\\",\\\"message\\\":{\\\"line\\\":223,\\\"class_name\\\":\\\"SelectError\\\",\\\"err\\\":\\\"Tuple field 4 type does not match one required by operation: expected string\\\",\\\"file\\\":\\\"...che\\\\\\\/.rocks\\\\\\\/share\\\\\\\/tarantool\\\\\\\/crud\\\\\\\/select\\\\\\\/compat\\\\\\\/select.lua\\\",\\\"stack\\\":\\\"stack traceback:\\\\n\\\\t...che\\\\\\\/.rocks\\\\\\\/share\\\\\\\/tarantool\\\\\\\/crud\\\\\\\/select\\\\\\\/compat\\\\\\\/select.lua:223: in function <...che\\\\\\\/.rocks\\\\\\\/share\\\\\\\/tarantool\\\\\\\/crud\\\\\\\/select\\\\\\\/compat\\\\\\\/select.lua:175>\\\\n\\\\t[C]: in function 'xpcall'\\\\n\\\\t...antool\\\\\\\/tarantool_cache\\\\\\\/.rocks\\\\\\\/share\\\\\\\/tarantool\\\\\\\/errors.lua:145: in function 'select'\\\\n\\\\t\\\\\\\/usr\\\\\\\/share\\\\\\\/tarantool\\\\\\\/tarantool_cache\\\\\\\/app\\\\\\\/roles\\\\\\\/handlers.lua:421: in function <\\\\\\\/usr\\\\\\\/share\\\\\\\/tarantool\\\\\\\/tarantool_cache\\\\\\\/app\\\\\\\/roles\\\\\\\/handlers.lua:411>\\\\n\\\\t[C]: in function 'pcall'\\\\n\\\\t...che\\\\\\\/.rocks\\\\\\\/share\\\\\\\/tarantool\\\\\\\/metrics\\\\\\\/collectors\\\\\\\/shared.lua:100: in function 'sub'\\\\n\\\\t...l\\\\\\\/tarantool_cache\\", "pid": 848 , "cord_name": "main", "fiber_id": 136157, "fiber_name": "http\/10.12.75.136:39966", "file": "\/usr\/share\/tarantool\/tarantool_cache\/app\/roles\/handlers.lua", "line": 437}
After downgrade to 0.5.0 everything ok.
Tuple field 4 type does not match one required by operation: expected string. Why?
Tuple field 4 is {name='VAS',type='unsigned'}.
The text was updated successfully, but these errors were encountered:
dokshina
changed the title
Upgrade crud from 0.5.0 to 0.6.0 getting a error with same handler
[4pt] Upgrade crud from 0.5.0 to 0.6.0 getting a error with same handler
Apr 8, 2021
# tarantool -version
Tarantool 2.6.2-0-g34d504d
Target: Linux-x86_64-RelWithDebInfo
10.78.221.228:3301> crud.select("country_list", {{'==', "country_list_Alfa3_idx", "RUS"}}, {timeout = 5})
---
- null
- line: 223
class_name: SelectError
err: 'Tuple field 4 type does not match one required by operation: expected string'
file: '...che/.rocks/share/tarantool/crud/select/compat/select.lua'
stack: "stack traceback:\n\t...che/.rocks/share/tarantool/crud/select/compat/select.lua:223:
in function <...che/.rocks/share/tarantool/crud/select/compat/select.lua:175>\n\t[C]:
in function 'xpcall'\n\t...antool/tarantool_cache/.rocks/share/tarantool/errors.lua:145:
in function <...antool/tarantool_cache/.rocks/share/tarantool/errors.lua:139>\n\t[C]:
in function 'pcall'\n\tbuiltin/box/console.lua:402: in function <builtin/box/console.lua:378>\n\t[C]:
at 0x004ee0a0"
str: 'SelectError: Tuple field 4 type does not match one required by operation:
expected string'
...
We have app with http server and spaces.
Wheh we upgrade crud from 0.5.0 to 0.6.0 getting a error with same handler for http method.
Http request:
At handler:
At logs:
After downgrade to 0.5.0 everything ok.
Tuple field 4 type does not match one required by operation: expected string. Why?
Tuple field 4 is {name='VAS',type='unsigned'}.
The text was updated successfully, but these errors were encountered: