From 92b8b695c7f46872f384f6990d6e7a112b8dc05d Mon Sep 17 00:00:00 2001 From: Roman Tsisyk <roman@tsisyk.com> Date: Tue, 30 Sep 2014 17:32:34 +0400 Subject: [PATCH] Review fixes for replica-ro-without-id --- src/box/lua/info.cc | 10 ++++------ test/replication/readonly.result | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/box/lua/info.cc b/src/box/lua/info.cc index 4a5914860a..f1616df17f 100644 --- a/src/box/lua/info.cc +++ b/src/box/lua/info.cc @@ -66,12 +66,10 @@ lbox_info_server(struct lua_State *L) lua_pushliteral(L, "uuid"); lua_pushlstring(L, tt_uuid_str(&recovery->server_uuid), UUID_STR_LEN); lua_settable(L, -3); - if (recovery->server_id != 0) { - lua_pushliteral(L, "lsn"); - luaL_pushnumber64(L, vclock_get(&recovery->vclock, - recovery->server_id)); - lua_settable(L, -3); - } + lua_pushliteral(L, "lsn"); + luaL_pushinumber64(L, vclock_get(&recovery->vclock, + recovery->server_id)); + lua_settable(L, -3); lua_pushliteral(L, "ro"); lua_pushboolean(L, box_is_ro()); lua_settable(L, -3); diff --git a/test/replication/readonly.result b/test/replication/readonly.result index 0d70b0115b..9a3b22b210 100644 --- a/test/replication/readonly.result +++ b/test/replication/readonly.result @@ -29,7 +29,7 @@ box.info.server.ro ... box.info.server.lsn --- -- null +- -1 ... space = box.schema.create_space("ro") --- -- GitLab