Skip to content

Commit

Permalink
box: expose box_is_orphan method
Browse files Browse the repository at this point in the history
is_orphan status check is needed by applier in order to tell relay
whether to send the instance's own rows back or not.

Prerequisite #4739
  • Loading branch information
sergepetrenko committed Feb 14, 2020
1 parent 95b9a48 commit f012caa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/box/box.cc
Expand Up @@ -247,6 +247,12 @@ box_is_ro(void)
return is_ro || is_orphan;
}

bool
box_is_orphan(void)
{
return is_orphan;
}

int
box_wait_ro(bool ro, double timeout)
{
Expand Down
3 changes: 3 additions & 0 deletions src/box/box.h
Expand Up @@ -105,6 +105,9 @@ box_set_ro();
bool
box_is_ro(void);

bool
box_is_orphan(void);

/**
* Wait until the instance switches to a desired mode.
* \param ro wait read-only if set or read-write if unset
Expand Down

0 comments on commit f012caa

Please sign in to comment.