[PATCH] Fix force_recovery on empty xlog

Konstantin Osipov kostja at tarantool.org
Thu Jan 25 22:27:33 MSK 2018


* Vladimir Davydov <vdavydov.dev at gmail.com> [18/01/25 19:18]:

> > @@ -1799,7 +1798,8 @@ xlog_cursor_openfd(struct xlog_cursor *i, int fd, const char *name)
> >  	if (rc == -1)
> >  		goto error;
> >  	if (rc > 0) {
> > -		diag_set(XlogError, "Unexpected end of file");
> > +		diag_set(XlogError, "Unexpected end of file %s, to fix "
> > +			 "try to run with 'force_recovery = true'", name);
> 
> This is definitely a wrong place to recommend using force_recovery,
> because there are other errors that can be remedied by this option.
> This should either be a part of every XlogError (not sure about that)
> or reside somewhere in recover_remaining_wals().

I already mentioned to Konstantin and Roman that I believe we need
to fix this problem by adding stacked diagnostics. Besides, it's a
different bug, so should be in a different patch anyway.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.org - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list