-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip syncing when replicated distributions were not updated
closes #5493
- Loading branch information
Showing
9 changed files
with
336 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Optimized the replication mechanism to skip syncing when replicated distributions were not updated. | ||
Generally, the optimization is applied only to distributions that have publications or repository | ||
versions attached to their upstream equivalents. |
36 changes: 36 additions & 0 deletions
36
pulpcore/app/migrations/0122_record_timestamps_for_replicated_distributions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Generated by Django 4.2.11 on 2024-07-30 21:41 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django_lifecycle.mixins | ||
import pulpcore.app.models.base | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0121_add_profile_artifacts_table'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='DistributionUpdatedTimestamp', | ||
fields=[ | ||
('pulp_id', models.UUIDField(default=pulpcore.app.models.base.pulp_uuid, editable=False, primary_key=True, serialize=False)), | ||
('pulp_created', models.DateTimeField(auto_now_add=True)), | ||
('pulp_last_updated', models.DateTimeField(auto_now=True, null=True)), | ||
('last_updated', models.DateTimeField()), | ||
('distribution', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.distribution')), | ||
('upstream_pulp', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.upstreampulp')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=(django_lifecycle.mixins.LifecycleModelMixin, models.Model), | ||
), | ||
migrations.AddField( | ||
model_name='upstreampulp', | ||
name='last_updated_timestamps', | ||
field=models.ManyToManyField(through='core.DistributionUpdatedTimestamp', to='core.distribution'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.