[PATCH 2 of 2] transaction: turn lack of locking into a hard failure (API)

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Tue May 17 07:21:35 EDT 2016


At Tue, 17 May 2016 12:40:25 +0200,
Pierre-Yves David wrote:
> 
> On 05/16/2016 08:47 AM, FUJIWARA Katsunori wrote:
> > At Fri, 13 May 2016 17:07:22 +0200,
> > Pierre-Yves David wrote:
> >> # HG changeset patch
> >> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> >> # Date 1462458053 -7200
> >> #      Thu May 05 16:20:53 2016 +0200
> >> # Node ID 59c815c01aee4777f88c6edc52fb959685813bec
> >> # Parent  d0c4dd6d292cc13c1ec2046d296380ba37c88033
> >> # EXP-Topic consistencycleanup
> >> transaction: turn lack of locking into a hard failure (API)
> >>
> >> We have been warning about transactions without lock for about a year (and
> >> three releases), third party extensions had a fair grace period to fix their
> >> code, we are moving lack of locking to a hard failure in order to protect users
> >> against repository corruptions.
> > Isn't "deprecwarn() period" needed before actual making transaction
> > without locking raise exception, like dirstate.write() without tr
> > argument ?
> 
> deprecwarn is the usual approach but I've a couple reason to take a
> different route in this specific case.
> 
> - This message is "just" a devel-warning and not a deprecation warning
> because it was introduced months before the official deprecation API,
> (with the intention to be turned into a failure at some point)
> - This case is not the deprecation of an existing valid API in favor of
> a newer one. It never was a valid pattern, it just silently lead to
> repository corruption,

Oh, I forgot important point "it never was a valid pattern" in this
case. This is certainly different from dirstate.write() or so. I see.

> - The warning have been around for about a year, 4 times the length of
> our current deprecation grace period. So third party had plenty of time
> to adapt,
> - The consequence of this issue are critical (repository corruption →
> data loss)
> 
> Cheers,
> 
> -- 
> Pierre-Yves
> 
> 

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list