From: Liu Yuan <tailai.ly at taobao.com> When startup the cluster for the first time, we would get the following message: Jun 06 17:29:32 read_epoch(525) failed to read epoch 0 This should be printed because cluster doesn't go error. Signed-off-by: Liu Yuan <tailai.ly at taobao.com> --- sheep/store.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sheep/store.c b/sheep/store.c index ad9883e..a9ae398 100644 --- a/sheep/store.c +++ b/sheep/store.c @@ -519,6 +519,9 @@ int read_epoch(uint32_t *epoch, uint64_t *ct, int ret; *epoch = get_latest_epoch(); + if (*epoch == 0) + return SD_RES_EIO; + ret = epoch_log_read(*epoch, (char *)entries, *nr_entries * sizeof(*entries)); if (ret == -1) { -- 1.7.10.2 |