[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Repo sync check to prevent disturbing an on-going sync



Will do, thx Jeff.

----- Original Message -----
> Looking at the diff: You should really move the __sync_lock =
> threading.RLock() to be a
> class variable since there is no guarantee you won't have multiple
> instance of the RepoApi
> instantiated in different threads.
> 
> On 04/11/2011 08:58 AM, Jay Dobies wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On 04/08/2011 06:47 PM, John Matthews wrote:
> >>
> >> ----- Forwarded Message -----
> >> From: "John Matthews"<jmatthew redhat com>
> >> Sent: Friday, April 8, 2011 6:42:02 PM
> >>
> >>
> >> We added a check in repo.py:_sync() which will limit 1 sync at a
> >> time per repository. The check is done using a boolean flag stored
> >> on the repo model object.
> >> It's still possible to sync multiple different repositories at the
> >> same time, the limit we've added is to prevent multiple sync
> >> operations on the same exact repository.
> >>
> >> This will prevent possible issues with recurring repo syncs
> >> colliding with on-demand syncs.
> >>
> >> Note: To prevent potential issues of pulp being shutdown uncleanly
> >> and a repo being locked in a bad state a 'clean' operation is
> >> performed on pulp startup.
> >>
> >> Commit is here:
> >> http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=33ef2654804e6f9a0b2bbd575e493f9a9e206f1a
> >>
> >> If you see any issues please let me know.
> >
> > So what is returned to me when I call sync but a sync is already
> > running?
> >
> > What happens if I am running a manual sync and during that time, the
> > recurring task hits its scheduled time and tries to run? Does it
> > just
> > skip and run at its next interval (this is the preferred behavior
> > IMO)?
> > Will it just run again right after the manual one is done (not as
> > good)?
> >
> > Is it possible to cancel a scheduled sync that is running and have
> > it
> > just requeue for the next scheduled interval?
> >
> > How do I retrieve the next scheduled sync time on a repo? I see
> > last_sync in the repo metadata, but not next_sync. The use case
> > being
> > "I'm thinking of kicking off a manual sync, but if one's gonna run
> > in
> > the next hour I won't bother."
> >
> > More to that last point, what I'm thinking for the RHUI UI is to
> > show
> > something like:
> >
> > Next Sync Last Sync Repo
> >
> > I won't bother with sample data since email client fonts will just
> > mess
> > it up, but you get the idea.
> >
> >
> > - --
> > Jay Dobies
> > RHCE# 805008743336126
> > Freenode: jdob
> > http://pulpproject.org
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v2.0.14 (GNU/Linux)
> > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> >
> > iQEcBAEBAgAGBQJNowkIAAoJEOMmcTqOSQHCf20H/RtTcN3yYWIsDMGr8ZMS+90i
> > LoOewxAliVRWBON/7aK1Z0kGKFjX6si7SR/QU2WsYIze5bb9t7SW2OwnobYw/7e9
> > t0FyST9a6Pj43aEBUaaX1zf36l6s50vI8SD5N/y0LPFaBmtyRjSZyDzT4x+cxULL
> > QqDODWCbOUdv2Boh1tPimYQAoC6gAiWiPuMwkR3kTbAo0jqR1zLip/xOwn+Z3r5j
> > GyP/x9nMTwriK2skkAkNFHZM81hq++XvnqcvS0uoymas+qRkyB5lYS7echkPLTm5
> > TdMBrl6ZNe5zbzbqoTEUa9XSzQLsOisqfV56Gy8dD/LF0fRjFZvXbB1guLcD3Lc=
> > =Ttn2
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Pulp-list mailing list
> > Pulp-list redhat com
> > https://www.redhat.com/mailman/listinfo/pulp-list
> 
> _______________________________________________
> Pulp-list mailing list
> Pulp-list redhat com
> https://www.redhat.com/mailman/listinfo/pulp-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]