From: Stefan Beller Date: Wed, 07 Dec 2016 20:56:55 GMT Subject: Re: [PATCH 1/3] wt-status: implement opportunisitc index update correctly Message-ID: In-Reply-To: On Wed, Dec 7, 2016 at 12:53 PM, Junio C Hamano wrote: > On Wed, Dec 7, 2016 at 12:48 PM, Stefan Beller wrote: >> >> So I would expect that we'd rather fix the update_index_if_able instead by >> checking for the lockfile to be in the correct state? > > I actually don't expect that, after looking at other call sites of > that function. Yes I checked the other callers as well right now and you seem to be correct. My initial response was based on the name of the function, specifically the _if_able part as that hinted to me that I can call the function with no precondition and the _if_able will figure out when to do the actual update_index. The first part of the condition of the function (istate->cache_changed || has_racy_timestamp(istate) reads rather as a _if_needed instead of an _if_able to me.