From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Pitre Subject: Re: Performance issue: initial git clone causes massive repack Date: Wed, 15 Apr 2009 07:51:22 -0400 (EDT) Message-ID: References: <20090407181259.GB4413@atjola.homenet> <20090407202725.GC4413@atjola.homenet> <20090410T203405Z@curie.orbis-terrarum.net> <20090414T202206Z@curie.orbis-terrarum.net> <7vljq2zckw.fsf@gitster.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Nguyen Thai Ngoc Duy , "Robin H. Johnson" , Johannes Schindelin , Git Mailing List To: Junio C Hamano X-From: git-owner@vger.kernel.org Wed Apr 15 13:53:04 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lu3fr-0005W3-Vl for gcvg-git-2@gmane.org; Wed, 15 Apr 2009 13:53:04 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752874AbZDOLva (ORCPT ); Wed, 15 Apr 2009 07:51:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752682AbZDOLv3 (ORCPT ); Wed, 15 Apr 2009 07:51:29 -0400 Received: from relais.videotron.ca ([24.201.245.36]:21165 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731AbZDOLv2 (ORCPT ); Wed, 15 Apr 2009 07:51:28 -0400 Received: from xanadu.home ([66.131.194.97]) by VL-MO-MR002.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KI5007SX4XMCX10@VL-MO-MR002.ip.videotron.ca> for git@vger.kernel.org; Wed, 15 Apr 2009 07:51:22 -0400 (EDT) X-X-Sender: nico@xanadu.home In-reply-to: <7vljq2zckw.fsf@gitster.siamese.dyndns.org> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Tue, 14 Apr 2009, Junio C Hamano wrote: > Nguyen Thai Ngoc Duy writes: > > > How can you do that? If I understand git protocol correctly, there is > > no difference between a fetch request and a clone one. > > At the protocol level, you can tell a clone request by noticing that the > downloading side does not have any "have" lines, but it is a different > matter what the software does out of the box. > > You can patch upload-pack to reject such requests. I am sure gentoo folks > are capable of doing that ;-) > > Also a rogue client can send a bogus "have" to fool that logic, and that > is the primary reason why we do not have such a patch to upload-pack. It > is not worth it as a protection against determined people who want to DoS. Implementing a minimum treshold with merge-base to ensure that the client has at least commit X should be easy to do. Unfortunately we don't have any hook for such a purpose yet. Nicolas