List for cgit developers and users
 help / color / mirror / Atom feed
* Cache bug: cached patches truncated to nearest 1024-byte boundary
@ 2014-06-11 19:46 mricon
  2014-06-11 20:01 ` [PATCH] ui-patch: Flush stdout after outputting data john
  0 siblings, 1 reply; 5+ messages in thread
From: mricon @ 2014-06-11 19:46 UTC (permalink / raw)


Hi, all:

It looks like cached patches are truncated to the nearest 1024-byte
boundary in the patch body. E.g.:

> mricon at nikko:[/tmp]$ wget -O no-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=6e1b4fdad5157bb9e88777d525704aba24389bee"
...
> 2014-06-11 15:34:51 (80.4 MB/s) - ?no-cache? saved [4767]

Patch is complete, without truncation. Next hit, with cache in place:

> mricon at nikko:[/tmp]$ wget -O yes-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=6e1b4
> fdad5157bb9e88777d525704aba24389bee"
...
> 2014-06-11 15:35:01 (17.0 MB/s) - ?yes-cache? saved [4096/4096]

Length truncated to 4096. The cache on disk looks truncated as well, so
the bug must me during the process of saving cache. The same is true for
larger patches:

> mricon at nikko:[/tmp]$ wget -O no-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=2840c566e95599cd60c7143762ca8b49d9395050"
...
> 2014-06-11 15:41:33 (1.07 MB/s) - ?no-cache? saved [979644]

979644 bytes with a cache-miss

> mricon at nikko:[/tmp]$ wget -O yes-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=2840c
> 566e95599cd60c7143762ca8b49d9395050"
...
> 2014-06-11 15:41:46 (1.05 MB/s) - ?yes-cache? saved [978944]

978944 (956KB exactly) with a cache-hit

I've verified this on our other installations and it would appear to
affect them all, not just git.kernel.org systems. Only patches appear to
be truncated -- all other cache files look sane.

This is causing us some grief, so a quickfix would be greatly appreciated!

Best,
-- 
Konstantin Ryabitsev
Senior Systems Administrator
Linux Foundation Collab Projects
Montr?al, Qu?bec

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140611/661a816d/attachment.asc>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-28 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-11 19:46 Cache bug: cached patches truncated to nearest 1024-byte boundary mricon
2014-06-11 20:01 ` [PATCH] ui-patch: Flush stdout after outputting data john
2014-06-11 20:28   ` mricon
2014-06-11 20:55     ` john
2014-06-28 13:59       ` Jason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).