diff --git a/.travis.yml b/.travis.yml index 0c28d3bd27cddfc75a5b9ca392e258a47c26dbb1..a6793381658f266fb1748288712d4ac2a5b91d25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,6 +57,8 @@ matrix: env: OS=ubuntu DIST=artful - name: Ubuntu Bionic (18.04) build + deploy DEB env: OS=ubuntu DIST=bionic + - name: Ubuntu Cosmic (18.10) build + deploy DEB + env: OS=ubuntu DIST=cosmic - name: Debian Wheezy (7) build + deploy DEB env: OS=debian DIST=wheezy - name: Debian Jessie (8) build + deploy DEB diff --git a/src/box/gc.c b/src/box/gc.c index 467eecb91e76d604500e05251f0ebf8cd4c19819..cefe1553f091b9d92d192beeefcad4f4ad0d04c2 100644 --- a/src/box/gc.c +++ b/src/box/gc.c @@ -109,8 +109,18 @@ gc_process_wal_event(struct wal_watcher_msg *); void gc_set_wal_watcher(void) { + /* + * Since the function is called from box_cfg() it is + * important that we do not pass a message processing + * callback to wal_set_watcher(). Doing so would cause + * credentials corruption in the fiber executing + * box_cfg() in case it processes some iproto messages. + * Besides, by the time the function is called + * tx_fiber_pool is already set up and it will process + * all the messages directed to "tx" endpoint safely. + */ wal_set_watcher(&gc.wal_watcher, "tx", gc_process_wal_event, - cbus_process, WAL_EVENT_GC); + NULL, WAL_EVENT_GC); } void diff --git a/src/box/lua/session.c b/src/box/lua/session.c index 4542d59eca08bfa3b1de6d8d25b214da235b6165..d3d27643fde153c9c37f606d2f5cb8280bd749b0 100644 --- a/src/box/lua/session.c +++ b/src/box/lua/session.c @@ -369,15 +369,15 @@ static int lbox_session_push(struct lua_State *L) { struct session *session = current_session(); - int ok; uint64_t sync; switch(lua_gettop(L)) { case 1: sync = session_sync(session); break; case 2: - sync = lua_tointegerx(L, 2, &ok); - if (ok != 0) { + sync = luaL_touint64(L, 2); + if (sync != 0 || (lua_isnumber(L, 2) && + lua_tonumber(L, 2) == 0)) { lua_pop(L, 1); break; } diff --git a/test/app-tap/console.test.lua b/test/app-tap/console.test.lua index 1c76072aa6513c7fcfdf7ce618973cfc2f82064c..4f915afd73a5d77bcf2ed01e34bd82054e9740b1 100755 --- a/test/app-tap/console.test.lua +++ b/test/app-tap/console.test.lua @@ -21,7 +21,7 @@ local EOL = "\n...\n" test = tap.test("console") -test:plan(57) +test:plan(59) -- Start console and connect to it local server = console.listen(CONSOLE_SOCKET) @@ -39,6 +39,14 @@ test:is(client:read(EOL), '%TAG !push! tag:tarantool.io/push,2018\n--- 200\n...\ "pushed message") test:is(client:read(EOL), '---\n- true\n...\n', "pushed message") +-- +-- gh-3790: box.session.push support uint64_t sync. +-- +client:write('box.session.push(1, 9223372036854775808ULL)\n') +test:is(client:read(EOL), '%TAG !push! tag:tarantool.io/push,2018\n--- 1\n...\n', + "pushed message") +test:is(client:read(EOL), '---\n- true\n...\n', "pushed message") + -- Execute some command client:write("1\n") test:is(yaml.decode(client:read(EOL))[1], 1, "eval")