How to find the base version cf-bot is using?

Started by Kyotaro HORIGUCHIover 7 years ago3 messages
#1Kyotaro HORIGUCHI
horiguchi.kyotaro@lab.ntt.co.jp

Hello. I found that the CF-bot is complaining on one of my patch.

http://cfbot.cputube.org/patch_18_931.log

=== applying patch ./v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch

...

|Date: Tue, 26 Dec 2017 17:43:09 +0900

...

Patching file src/backend/utils/cache/plancache.c using Plan A...
Hunk #1 failed at 63.
Hunk #2 failed at 88.
Hunk #3 failed at 113.
Hunk #4 succeeded at 296 with fuzz 2 (offset 79 lines).
Hunk #5 succeeded at 388 with fuzz 1 (offset -46 lines).
Hunk #6 failed at 457.
Hunk #7 failed at 484.
Hunk #8 failed at 498.
Hunk #9 failed at 542.
Hunk #10 succeeded at 1321 with fuzz 2 (offset 115 lines).
Hunk #11 failed at 1340.
Hunk #12 failed at 1357.
Hunk #13 succeeded at 1983 with fuzz 1 (offset 48 lines).
9 out of 13 hunks failed--saving rejects to src/backend/utils/cache/plancache.c.rej

On the other hand the same patch cleanly applies on the master
HEAD with no offsets.

$ patch -p1 < ~/work/patches/v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch
patching file doc/src/sgml/config.sgml
patching file src/backend/access/transam/xact.c
patching file src/backend/utils/cache/catcache.c
patching file src/backend/utils/cache/plancache.c
patching file src/backend/utils/misc/guc.c
patching file src/backend/utils/misc/postgresql.conf.sample
patching file src/include/utils/catcache.h
patching file src/include/utils/plancache.h
{work}[pg@master]$ git status
On branch master
Your branch is up to date with 'origin/master'.
...
$ git log -1
commit a33969ee918aafdb9086be27d7d63b129b4bfc44 (HEAD -> master, origin/master, origin/HEAD)
Author: Peter Eisentraut <peter_e@gmx.net>
Date: Sun Jul 1 15:10:08 2018 +0200

How can I find the base version the CF-bot used at the time?

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

#2Thomas Munro
thomas.munro@enterprisedb.com
In reply to: Kyotaro HORIGUCHI (#1)
Re: How to find the base version cf-bot is using?

On Mon, Jul 2, 2018 at 9:39 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:

=== applying patch ./v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch

...

|Date: Tue, 26 Dec 2017 17:43:09 +0900

...

Patching file src/backend/utils/cache/plancache.c using Plan A...
Hunk #1 failed at 63.

That's complaining about patch 0004 in your patch set. The first 3
apply OK, but it looks like maybe 0004 includes stuff that was already
in 0001? cfbot tries to apply them all. I just tried it on HEAD
myself:

$ patch -p1 < v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch
patching file doc/src/sgml/config.sgml
patching file src/backend/access/transam/xact.c
patching file src/backend/utils/cache/catcache.c
patching file src/backend/utils/cache/plancache.c
patching file src/backend/utils/misc/guc.c
patching file src/backend/utils/misc/postgresql.conf.sample
patching file src/include/utils/catcache.h
patching file src/include/utils/plancache.h
$ patch -p1 < v4-0002-introduce-dynhash-pruning.patch
patching file src/backend/utils/hash/dynahash.c
patching file src/include/utils/catcache.h
patching file src/include/utils/hsearch.h
$ patch -p1 < v4-0003-Apply-purning-to-relcache.patch
patching file src/backend/utils/cache/relcache.c
$ patch -p1 < v4-0004-Generic-plan-removal-of-PlanCacheSource.patch
patching file src/backend/utils/cache/plancache.c
Reversed (or previously applied) patch detected! Assume -R? [n] ^C

Let's see, 0001 and 0004 both include this hunk:

--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -63,12 +63,14 @@
 #include "storage/lmgr.h"
 #include "tcop/pquery.h"
 #include "tcop/utility.h"
+#include "utils/catcache.h"
 #include "utils/inval.h"
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -63,12 +63,14 @@
 #include "storage/lmgr.h"
 #include "tcop/pquery.h"
 #include "tcop/utility.h"
+#include "utils/catcache.h"
 #include "utils/inval.h"

On the other hand the same patch cleanly applies on the master
HEAD with no offsets.

$ patch -p1 < ~/work/patches/v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch
patching file doc/src/sgml/config.sgml
patching file src/backend/access/transam/xact.c
patching file src/backend/utils/cache/catcache.c
patching file src/backend/utils/cache/plancache.c
patching file src/backend/utils/misc/guc.c
patching file src/backend/utils/misc/postgresql.conf.sample
patching file src/include/utils/catcache.h
patching file src/include/utils/plancache.h

Here you show only patch 0001.

How can I find the base version the CF-bot used at the time?

Yeah. Sorry. I should include that information in the log to make it
clearer what it's doing. I will do that in the next update.

--
Thomas Munro
http://www.enterprisedb.com

#3Kyotaro HORIGUCHI
horiguchi.kyotaro@lab.ntt.co.jp
In reply to: Thomas Munro (#2)
Re: How to find the base version cf-bot is using?

Hello. Thomas.

At Mon, 2 Jul 2018 22:14:42 +1200, Thomas Munro <thomas.munro@enterprisedb.com> wrote in <CAEepm=2w9=izjBEU+za78_shK6UpBnNGGAE0ysvQ5j9gnrhz8g@mail.gmail.com>

On Mon, Jul 2, 2018 at 9:39 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:

=== applying patch ./v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch

...

|Date: Tue, 26 Dec 2017 17:43:09 +0900

...

Patching file src/backend/utils/cache/plancache.c using Plan A...
Hunk #1 failed at 63.

That's complaining about patch 0004 in your patch set. The first 3
apply OK, but it looks like maybe 0004 includes stuff that was already
in 0001? cfbot tries to apply them all. I just tried it on HEAD
myself:

...

Here you show only patch 0001.

Mmm. The offsets grabed my attention. As your suggestion 0003
included the whole 0004. Thank you (and sorry) for the time to
check it.

Still I don't understand how git emitted the four broken
patchset, though.

How can I find the base version the CF-bot used at the time?

Yeah. Sorry. I should include that information in the log to make it
clearer what it's doing. I will do that in the next update.

Thank you.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center