Skip to content
Snippets Groups Projects
Commit 080b51b8 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

recovery: remove dead code, add a comment

parent f232756b
No related branches found
No related tags found
No related merge requests found
......@@ -136,6 +136,12 @@ lbox_info_replication(struct lua_State *L)
static int
lbox_info_server(struct lua_State *L)
{
/*
* Self can be NULL during bootstrap: entire box.info
* bundle becomes available soon after entering box.cfg{}
* and replication bootstrap relies on this as it looks
* at box.info.status.
*/
struct replica *self = replica_by_uuid(&INSTANCE_UUID);
lua_createtable(L, 0, 2);
lua_pushliteral(L, "id");
......
......@@ -158,7 +158,6 @@ void
replica_clear_id(struct replica *replica)
{
assert(replica->id != REPLICA_ID_NIL && replica->id != instance_id);
/*
* Don't remove replicas from vclock here.
* The vclock_sum() must always grow, it is a core invariant of
......@@ -168,8 +167,6 @@ replica_clear_id(struct replica *replica)
* Some records may arrive later on due to asynchronous nature of
* replication.
*/
if (instance_id == replica->id)
instance_id = REPLICA_ID_NIL;
replica->id = REPLICA_ID_NIL;
if (replica_is_orphan(replica)) {
replicaset_remove(&replicaset, replica);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment