comparison tests/test-clonebundles.t @ 45062:72feaeb510b3

clonebundles: optional memory-requirement attribution The new REQUIREDRAM option allows a client to skip bundles it isn't expected to handle well, e.g. without swapping. This allows a fallback path to be provided e.g. using zstd level 10 instead of 22. Differential Revision: https://phab.mercurial-scm.org/D8645
author Joerg Sonnenberger <joerg@bec.de>
date Mon, 22 Jun 2020 00:00:07 +0200
parents 89f83e47e9c9
children 95a615dd77bf
comparison
equal deleted inserted replaced
45061:02b17231f6c3 45062:72feaeb510b3
549 added 2 changesets with 2 changes to 2 files 549 added 2 changesets with 2 changes to 2 files
550 finished applying clone bundle 550 finished applying clone bundle
551 searching for changes 551 searching for changes
552 no changes found 552 no changes found
553 2 local changesets published 553 2 local changesets published
554 $ killdaemons.py
555
556 A manifest with a gzip bundle requiring too much memory for a 16MB system and working
557 on a 32MB system.
558
559 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
560 $ cat http.pid >> $DAEMON_PIDS
561 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
562 $ cat hg.pid >> $DAEMON_PIDS
563
564 $ cat > server/.hg/clonebundles.manifest << EOF
565 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 REQUIREDRAM=12MB
566 > EOF
567
568 $ hg clone -U --debug --config ui.available-memory=16MB http://localhost:$HGPORT gzip-too-large
569 using http://localhost:$HGPORT/
570 sending capabilities command
571 sending clonebundles command
572 filtering http://localhost:$HGPORT1/gz-a.hg as it needs more than 2/3 of system memory
573 no compatible clone bundles available on server; falling back to regular clone
574 (you may want to report this to the server operator)
575 query 1; heads
576 sending batch command
577 requesting all changes
578 sending getbundle command
579 bundle2-input-bundle: with-transaction
580 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
581 adding changesets
582 add changeset 53245c60e682
583 add changeset aaff8d2ffbbf
584 adding manifests
585 adding file changes
586 adding bar revisions
587 adding foo revisions
588 bundle2-input-part: total payload size 920
589 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
590 bundle2-input-part: "phase-heads" supported
591 bundle2-input-part: total payload size 24
592 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
593 bundle2-input-part: total payload size 59
594 bundle2-input-bundle: 4 parts total
595 checking for updated bookmarks
596 updating the branch cache
597 added 2 changesets with 2 changes to 2 files
598 new changesets 53245c60e682:aaff8d2ffbbf
599 calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
600 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
601
602 $ hg clone -U --debug --config ui.available-memory=32MB http://localhost:$HGPORT gzip-too-large2
603 using http://localhost:$HGPORT/
604 sending capabilities command
605 sending clonebundles command
606 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
607 bundle2-input-bundle: 1 params with-transaction
608 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
609 adding changesets
610 add changeset 53245c60e682
611 add changeset aaff8d2ffbbf
612 adding manifests
613 adding file changes
614 adding bar revisions
615 adding foo revisions
616 bundle2-input-part: total payload size 920
617 bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
618 bundle2-input-part: total payload size 59
619 bundle2-input-bundle: 2 parts total
620 updating the branch cache
621 added 2 changesets with 2 changes to 2 files
622 finished applying clone bundle
623 query 1; heads
624 sending batch command
625 searching for changes
626 all remote heads known locally
627 no changes found
628 sending getbundle command
629 bundle2-input-bundle: with-transaction
630 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
631 bundle2-input-part: "phase-heads" supported
632 bundle2-input-part: total payload size 24
633 bundle2-input-bundle: 2 parts total
634 checking for updated bookmarks
635 2 local changesets published
636 calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
637 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
638 $ killdaemons.py