#2644 Lower default multicall batch values
Merged a year ago by tkopecek. Opened a year ago by tkopecek.
tkopecek/koji issue2616  into  master

file modified
+1 -1
@@ -3410,7 +3410,7 @@ 

      parser.add_option("-f", "--force", action="store_true",

                        help=_("override tag locks if necessary"))

      parser.add_option("-n", "--test", action="store_true", help=_("test mode"))

-     parser.add_option("--batch", type='int', default=1000, metavar='SIZE',

+     parser.add_option("--batch", type='int', default=100, metavar='SIZE',

                        help=_("batch size of multicalls [0 to disable, default: %default]"))

      (options, args) = parser.parse_args(args)

  

@@ -223,7 +223,7 @@ 

                                                             block=True,

                                                             extra_arches='arch3 arch4',

                                                             owner='userB'),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

                                         call.listTagged(1, event=None,

                                                         inherit=None,

                                                         latest=None),
@@ -255,7 +255,7 @@ 

                                             'tag_name': 'src-tag',

                                             'name': 'pkg1'}, force=None,

                                                             notify=False),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

                                         call.getTagGroups('src-tag',

                                                           event=None),

                                         call.groupListAdd('dst-tag', 'group1'),
@@ -276,7 +276,7 @@ 

                                                                  'group2',

                                                                  'bpkg',

                                                                  block=False),

-                                        call.multiCall(batch=1000)])

+                                        call.multiCall(batch=100)])

          self.assert_console_message(stdout, """

  List of changes:

  
@@ -508,7 +508,7 @@ 

                                                             block=True,

                                                             extra_arches='arch3 arch4',

                                                             owner='userB'),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

                                         call.untagBuildBypass('dst-tag', {

                                             'owner_name': 'b_owner',

                                             'nvr': 'pkg1-2.1-2',
@@ -530,7 +530,7 @@ 

                                             'tag_name': 'dst-tag',

                                             'name': 'pkg3'}, force=None,

                                                               notify=False),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

                                         call.tagBuildBypass('dst-tag', {

                                             'owner_name': 'b_owner',

                                             'nvr': 'pkg1-0.1-1',
@@ -552,8 +552,8 @@ 

                                             'tag_name': 'src-tag',

                                             'name': 'pkg1'}, force=None,

                                                             notify=False),

-                                        call.multiCall(batch=1000),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

+                                        call.multiCall(batch=100),

                                         call.groupPackageListAdd('dst-tag',

                                                                  'group1',

                                                                  'pkg2',
@@ -570,21 +570,21 @@ 

                                                                  'group2',

                                                                  'bpkg',

                                                                  force=None),

-                                        call.multiCall(batch=1000),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

+                                        call.multiCall(batch=100),

                                         call.packageListBlock('dst-tag',

                                                               'bpkg'),

                                         call.packageListBlock('dst-tag',

                                                               'cpkg'),

                                         call.packageListBlock('dst-tag',

                                                               'dpkg'),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

                                         call.groupListRemove('dst-tag',

                                                              'group3',

                                                              force=None),

                                         call.groupListBlock('dst-tag',

                                                             'group4'),

-                                        call.multiCall(batch=1000),

+                                        call.multiCall(batch=100),

                                         call.groupPackageListRemove('dst-tag',

                                                                     'group1',

                                                                     'pkg5',
@@ -592,7 +592,7 @@ 

                                         call.groupPackageListBlock('dst-tag',

                                                                    'group2',

                                                                    'cpkg'),

-                                        call.multiCall(batch=1000)])

+                                        call.multiCall(batch=100)])

          self.assert_console_message(stdout, """

  List of changes:

  
@@ -886,7 +886,7 @@ 

    --notify          Send tagging/untagging notifications

    -f, --force       override tag locks if necessary

    -n, --test        test mode

-   --batch=SIZE      batch size of multicalls [0 to disable, default: 1000]

+   --batch=SIZE      batch size of multicalls [0 to disable, default: 100]

  """ % self.progname)

  

  

file modified
+3 -3
@@ -459,7 +459,7 @@ 

  

      print("2nd pass: references")

      i = 0

-     mcall = koji.MultiCallSession(session, batch=1000)

+     mcall = koji.MultiCallSession(session, batch=10)

      for binfo in continuing:

          mcall.buildReferences(binfo['id'], limit=10, lazy=True)

      for binfo, [refs] in zip(continuing, mcall.call_all()):
@@ -554,7 +554,7 @@ 

      for binfo in to_trash:

          by_owner.setdefault(binfo['owner_name'], []).append(binfo)

      owners = sorted(to_list(by_owner.keys()))

-     mcall = koji.MultiCallSession(session, batch=1000)

+     mcall = koji.MultiCallSession(session, batch=100)

      for owner_name in owners:

          builds = sorted([(b['nvr'], b) for b in by_owner[owner_name]])

          send_warning_notice(owner_name, [x[1] for x in builds])
@@ -643,7 +643,7 @@ 

  

      print("2nd pass: tags")

      continuing, trash = [], continuing

-     mcall = koji.MultiCallSession(session, batch=1000)

+     mcall = koji.MultiCallSession(session, batch=100)

      for nvr, binfo in trash:

          mcall.listTags(build=binfo['id'], perms=False)

      for (nvr, binfo), [tags] in zip(trash, mcall.call_all()):

2 new commits added

  • lower batches in clone-tag multicalls
  • lower multicall batches in koji-gc
a year ago

Metadata Update from @tkopecek:
- Pull-request tagged with: no_qe

a year ago

Commit a5edca8 fixes this pull-request

Pull-Request has been merged by tkopecek

a year ago