From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [OSSTEST PATCH 5/8] Schema: Support database schema updates
Date: Fri, 11 Dec 2015 11:58:54 +0000 [thread overview]
Message-ID: <1449835134.29268.8.camel@citrix.com> (raw)
In-Reply-To: <22121.48596.663367.284017@mariner.uk.xensource.com>
On Thu, 2015-12-10 at 18:00 +0000, Ian Jackson wrote:
> Ian Campbell writes ("Re: [OSSTEST PATCH 5/8] Schema: Support database
> schema updates"):
> > On Thu, 2015-12-10 at 17:12 +0000, Ian Jackson wrote:
> > > +<sequence> is a positive integer, which should be unique. Updates
> > > are
> > > +applied in order.
> >
> > Don't these also need to be monotonically increasing over time/commits?
> >
> > i.e. committing (and applying through all the states) sequence #42 and
> > then
> > later committing #12 would be at best confusing and at worse perhaps
> > produce different results when recreating the db (which, I think, would
> > run
> > #12 first).
> >
> > So maybe the rule needs to be something about being larger than the
> > largest
> > currently applied patch?
>
> It does say that updates are applied in order.
Right I was considering an osstest repo with 01 and 03 in it, which is
applied and all up to date, but then someone adds 02 and applies it
(therefore after 03).
> > It's not stated outright, but AIUI the <status> of an update changes in
> > a
> > commit which either adds/edits a schema update, or which adds code
> > which
> > adds compatibility/requirements for a particular schema update. Is that
> > right?
>
> Yes. I think it should be clear from the rest of the discussion and
> I'm not sure that adding some more text here would help clarify
> things overall.
I was just checking that I had groked it correctly, no need to change
anything.
> > > +Statuses and rules for push and db update
> > > +-----------------------------------------
> > > +
> > > + Harmless
> > > + Preparatory
> > > + No restrictions
> > > +
> > > + Unfinished
> > > + (sql fragment entirely missing is equivalent to Unfinished)
> > > + Schema update: prevented
> >
> > In the case of "entirely missing" "prevented" must really mean "there
> > can't
> > possibly be anything to do/prevent"?
>
> Well, if you say
> ./mg-schema-update apply this-update-does-not-exist
> it will bomb out.
>
> And
> ./mg-schema-update apply-all
> will not invent imaginary schema changes out of thin air so that
> it can apply them.
>
> So, application of nonexistent schema changes is indeed prevented by
> their nonexistence.
Right, I was just wanting to check that you didn't have some mad scheme in
mind for knowing about things which don't exist.
It occurs to me now that while "update-foo" might not exist in the
osstest.git where ./mg-schema-update is being run, it might exist in
another one and therefore have been applied and be present in the database.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-12-11 12:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 17:12 [OSSTEST PATCH v2 0/8] Support database schema updates Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 1/8] mg-schema-test-database: Fix argument parsing for _SUFFIX Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 2/8] Schema: Rename schema file Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 3/8] Schema: Remove SET OWNER and GRANT/REVOKE from schema/initial.sql Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 4/8] Schema: Introduce mg-schema-create Ian Jackson
2015-12-10 17:17 ` Ian Campbell
2015-12-10 17:26 ` Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 5/8] Schema: Support database schema updates Ian Jackson
2015-12-10 17:48 ` Ian Campbell
2015-12-10 18:00 ` Ian Jackson
2015-12-10 18:27 ` Ian Jackson
2015-12-11 13:31 ` Ian Campbell
2015-12-11 15:15 ` Ian Jackson
2015-12-11 15:18 ` Ian Campbell
2015-12-11 15:34 ` Ian Jackson
2015-12-11 15:54 ` Ian Campbell
2015-12-11 11:58 ` Ian Campbell [this message]
2015-12-11 15:08 ` Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 6/8] Schema: Check that schema creation and update runs as the right user Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 7/8] Schema: drop old resource_log table Ian Jackson
2015-12-10 17:12 ` [OSSTEST PATCH 8/8] Schema: When creating, check that no updates are applied Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449835134.29268.8.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.