Skip to content
Snippets Groups Projects
Select Git revision
  • feat/repo-assignment-migration
  • master default protected
  • kn-fix-migration-context
  • sh-limit-praefect-connection-age
  • ec/raft-snapshotting-streaming
  • qmnguyen0711/backfill-missing-fsync-when-writing-manifest
  • qmnguyen0711/integrate-etcd-raft-with-transactions-v2
  • eju/gitaly/6506/6640/prepare-offloading
  • activate-bundle-uri-generation
  • jc/my-branch
  • mbayar/bump-minimum-go-version
  • 6270-restore-partition
  • 6628-persistent-routing-table
  • jliu/bump-module-version-to-v17
  • mb-fix-crypto-vuln
  • 17-7-stable protected
  • 17-8-stable protected
  • 17-9-stable protected
  • gitaly-renovate-tools/golangci-lint/golang.org-x-tools-0.x
  • 6626-dry-run-reftable-migration-on-staging
  • v17.7.6 protected
  • v17.8.4 protected
  • v17.9.1 protected
  • v17.8.3 protected
  • v17.7.5 protected
  • v17.9.0 protected
  • v17.9.0-rc42 protected
  • v17.6.5 protected
  • v17.7.4 protected
  • v17.8.2 protected
  • v17.6.4 protected
  • v17.7.3 protected
  • v17.8.1 protected
  • v17.8.0 protected
  • v17.7.2 protected
  • v17.8.0-rc42 protected
  • v17.5.5 protected
  • v17.6.3 protected
  • v17.7.1 protected
  • v17.7.0 protected
40 results

manager.go

  • Olivier Campeau's avatar
    f4d6f721
    Bundle-uri capability: Only advertise when bundle exist · f4d6f721
    Olivier Campeau authored
    When a client performs a git-clone (SSH or Smarthttp)
    Gitaly instructs the `git-upload-pack` command to
    systematically advertise the bundle-uri capability.
    
    This situation causes the Git client to request a
    bundle-uri even when one does not exists, thus adding
    unnecessary latency to the overall `clone` operation.
    It also makes it hard to properly monitor the usage
    of bundle-uri by clients; we can't correlate a request
    for bundle-uri with an actual usage of it.
    
    The proposed changes have the `git-upload-pack` command
    advertise bundle-uri only when a bundle exists for the
    given repository.
    
    More context:
    
    For SSH, this change does not provide much benefit since
    the whole packfile negociation flow is performed on a single
    connection. In other words, the flow starts when the client
    starts the upload-pack service, and it ends when the client
    received all the objects it needed.
    
    For SmartHTTP, however, this is different. Each request/command
    sent by the client (`ls-refs`, `bundle-uri`, `fetch`) is sent
    on different, stateless, RPC calls. There is no way to know
    what command the client is sending to the git-upload-pack process
    until that process is actually started, which means that the Git
    config injected into the process must be computed in advance for
    every request; this implies computing the SignedURL of the bundle
    if it exist. By advertising `bundle-uri` capability only
    when a bundle exists for the given repository, we make sure
    the client won't send a `bundle-uri` command if no bundle exist.
    
    For SmartHTTP it not only reduces by 1 the number of round-trip
    request and the number of Git config computation, but it also
    makes it easier to monitor the use of `bundle-uri` feature, since
    we can be sure that when a client sends the `bundle-uri` command,
    it is because:
    1. A bundle exists
    2. The server advertised the capability
    3. The client support the capability
    
    References:
    #6572
    f4d6f721
    History
    Bundle-uri capability: Only advertise when bundle exist
    Olivier Campeau authored
    When a client performs a git-clone (SSH or Smarthttp)
    Gitaly instructs the `git-upload-pack` command to
    systematically advertise the bundle-uri capability.
    
    This situation causes the Git client to request a
    bundle-uri even when one does not exists, thus adding
    unnecessary latency to the overall `clone` operation.
    It also makes it hard to properly monitor the usage
    of bundle-uri by clients; we can't correlate a request
    for bundle-uri with an actual usage of it.
    
    The proposed changes have the `git-upload-pack` command
    advertise bundle-uri only when a bundle exists for the
    given repository.
    
    More context:
    
    For SSH, this change does not provide much benefit since
    the whole packfile negociation flow is performed on a single
    connection. In other words, the flow starts when the client
    starts the upload-pack service, and it ends when the client
    received all the objects it needed.
    
    For SmartHTTP, however, this is different. Each request/command
    sent by the client (`ls-refs`, `bundle-uri`, `fetch`) is sent
    on different, stateless, RPC calls. There is no way to know
    what command the client is sending to the git-upload-pack process
    until that process is actually started, which means that the Git
    config injected into the process must be computed in advance for
    every request; this implies computing the SignedURL of the bundle
    if it exist. By advertising `bundle-uri` capability only
    when a bundle exists for the given repository, we make sure
    the client won't send a `bundle-uri` command if no bundle exist.
    
    For SmartHTTP it not only reduces by 1 the number of round-trip
    request and the number of Git config computation, but it also
    makes it easier to monitor the use of `bundle-uri` feature, since
    we can be sure that when a client sends the `bundle-uri` command,
    it is because:
    1. A bundle exists
    2. The server advertised the capability
    3. The client support the capability
    
    References:
    #6572
Code owners
Assign users and groups as approvers for specific file changes. Learn more.