#485 Optimize components reuse across batches
Closed: Duplicate 5 years ago by lucarval. Opened 6 years ago by jkaluza.

For modules with lot of batches which every contain just few components (and we will see much more modules like that in the future), it makes sense to reuse multiple batches at once if possible.

For example, let's have module with following batches:

batch 1: apr
batch 2: apr-util
batch 3: httpd

When only httpd changes in next module build, MBS currently does following:

  • 1) Start building batch 1, reuse apr
  • 2) tag apr to buildroot and wait for repo-regen
  • 3) Start building batch 2, reuse apr-util
  • 4) tag apr-util to buildroot and wait for repo-regen
  • 5) start building batch 3

But In case all the components in batch 1 and batch 2 are being reused, it can do following and save lot of time and koji resources on repo-regen:

1) Start building batch 1, reuse apr
2) If all components from batch have been reused, check if we could reuse all components from next batch.
3) Repeat 2) until there is a batch N from which we cannot reuse some component (batch 3 with in our example)
4) Tag all the packages from batch 1 to N in single step (apr, apr-util in our example)
5) Set the module_build.batch to N-1 (2 in our case)
6) Wait for repo-regen, so repos.py:done can handle this message and continue with build normally.

Steps 1) to 5) has to all happen in the utils.py:continue_batch_build.

This saves one repo-regen per every completely reused batch.


Metadata Update from @lucarval:
- Issue close_status updated to: Duplicate
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata