[vwnc] Duplicate versions in Store

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Duplicate versions in Store

Reinout Heeck-2

VW7.6/WinXP/StoreForOracle

We are seeing duplicate version strings appearing in our Store db.
In the past I have been told that this is impossible because all Store
operations are wrapped in a transaction that should avoid such problems,
so I guess there is some leak somewhere.

Do other people here see duplicate version numbers? Is this a known problem?


R
-


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

foo.gif (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Duplicate versions in Store

Alan Knight-2
In fact it's not impossible precisely because all operations are wrapped in a transaction. When publishing, it will check for a duplicate version number in the database, but if there's someone else in the process of writing who hasn't committed their transaction yet, it won't see it. So it can choose a number that will be a duplicate.

You could avoid this by adding a unique constraint on the package/bundle version string in the database, and then the second person's publish would fail with a database error and have to be redone (and possibly re-reconciled, but I'm not sure about that).

At 05:31 AM 3/24/2009, Reinout Heeck wrote:

>VW7.6/WinXP/StoreForOracle
>
>We are seeing duplicate version strings appearing in our Store db.
>In the past I have been told that this is impossible because all Store operations are wrapped in a transaction that should avoid such problems, so I guess there is some leak somewhere.
>
>Do other people here see duplicate version numbers? Is this a known problem?
>
>
>R
>-
>
>
>
>
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Duplicate versions in Store

Reinout Heeck-2
In reply to this post by Reinout Heeck-2
Alan Knight wrote:
> In fact it's not impossible precisely because all operations are wrapped in a transaction. When publishing, it will check for a duplicate version number in the database, but if there's someone else in the process of writing who hasn't committed their transaction yet, it won't see it. So it can choose a number that will be a duplicate.
>
>  
Ah, quite clear now.

> You could avoid this by adding a unique constraint on the package/bundle version string in the database, and then the second person's publish would fail with a database error and have to be redone (and possibly re-reconciled, but I'm not sure about that).
>
>  

Are you willing to AR this so that future versions would fail more
gracefully than with an exception (and a possible need to reconcile)?

I'll experiment with just adding the constraint for now... duplicate
version numbers break our process ;-)




Thanks,

Reinout
-------


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Duplicate versions in Store

Alan Knight-2
At 11:37 AM 3/24/2009, Reinout Heeck wrote:

>Alan Knight wrote:
>> In fact it's not impossible precisely because all operations are wrapped in a transaction. When publishing, it will check for a duplicate version number in the database, but if there's someone else in the process of writing who hasn't committed their transaction yet, it won't see it. So it can choose a number that will be a duplicate.
>>
>>  
>Ah, quite clear now.
>
>> You could avoid this by adding a unique constraint on the package/bundle version string in the database, and then the second person's publish would fail with a database error and have to be redone (and possibly re-reconciled, but I'm not sure about that).
>>
>>  
>
>Are you willing to AR this so that future versions would fail more
>gracefully than with an exception (and a possible need to reconcile)?
>
>I'll experiment with just adding the constraint for now... duplicate
>version numbers break our process ;-)

In fact there is already an AR for it, 50360. It becomes a lot easier with the Glorpification of the underlying frameworks, so while I wouldn't expect it for 7.7 we might be able to manage it for the release after that.

Also, that constraint would of course have to be on package/bundle name + version name. Otherwise it will disallow any two packages in the entire repository to have the same version name, which is probably not what you're looking for.
--
Alan Knight [|], Engineering Manager, Cincom Smalltalk
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Duplicate versions in Store

Terry Raymond
Alan

Are the version numbers duplicated anywhere in the database?
If not, then one could use the admin tool to fix numbers.

Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alan Knight
Sent: Tuesday, March 24, 2009 11:44 AM
To: Reinout Heeck; 'VWNC'
Subject: Re: [vwnc] Duplicate versions in Store

At 11:37 AM 3/24/2009, Reinout Heeck wrote:
>Alan Knight wrote:
>> In fact it's not impossible precisely because all operations are wrapped in a transaction. When publishing, it will
check for a duplicate version number in the database, but if there's someone else in the process of writing who hasn't
committed their transaction yet, it won't see it. So it can choose a number that will be a duplicate.
>>
>>  
>Ah, quite clear now.
>
>> You could avoid this by adding a unique constraint on the package/bundle version string in the database, and then the
second person's publish would fail with a database error and have to be redone (and possibly re-reconciled, but I'm not
sure about that).
>>
>>  
>
>Are you willing to AR this so that future versions would fail more
>gracefully than with an exception (and a possible need to reconcile)?
>
>I'll experiment with just adding the constraint for now... duplicate
>version numbers break our process ;-)

In fact there is already an AR for it, 50360. It becomes a lot easier with the Glorpification of the underlying
frameworks, so while I wouldn't expect it for 7.7 we might be able to manage it for the release after that.

Also, that constraint would of course have to be on package/bundle name + version name. Otherwise it will disallow any
two packages in the entire repository to have the same version name, which is probably not what you're looking for.
--
Alan Knight [|], Engineering Manager, Cincom Smalltalk
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Duplicate versions in Store

Reinout Heeck-2
In reply to this post by Reinout Heeck-2
Alan Knight wrote:
> In fact there is already an AR for it, 50360. It becomes a lot easier with the Glorpification of the underlying frameworks, so while I wouldn't expect it for 7.7 we might be able to manage it for the release after that.
>  
Ah good, the sooner the better though as far as we are concerned ;-)



> Also, that constraint would of course have to be on package/bundle name + version name. Otherwise it will disallow any two packages in the entire repository to have the same version name, which is probably not what you're looking for.
>  
Duh, thanks!




R
-

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Duplicate versions in Store

Alan Knight-2
In reply to this post by Terry Raymond
Yes, you could certainly go in and just change the numbers with any number of database tools or just with raw SQL. You could also just put something into the post-publish, or a regular checking process that looked for that circumstance and either fixed it or alerted somebody or both.

At 12:00 PM 3/24/2009, Terry Raymond wrote:

>Alan
>
>Are the version numbers duplicated anywhere in the database?
>If not, then one could use the admin tool to fix numbers.
>
>Terry
>
>===========================================================
>Terry Raymond
>Crafted Smalltalk
>80 Lazywood Ln.
>Tiverton, RI  02878
>(401) 624-4517      [hidden email]
><http://www.craftedsmalltalk.com>
>===========================================================
>
>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]] On Behalf Of Alan Knight
>Sent: Tuesday, March 24, 2009 11:44 AM
>To: Reinout Heeck; 'VWNC'
>Subject: Re: [vwnc] Duplicate versions in Store
>
>At 11:37 AM 3/24/2009, Reinout Heeck wrote:
>>Alan Knight wrote:
>>> In fact it's not impossible precisely because all operations are wrapped in a transaction. When publishing, it will
>check for a duplicate version number in the database, but if there's someone else in the process of writing who hasn't
>committed their transaction yet, it won't see it. So it can choose a number that will be a duplicate.
>>>
>>>  
>>Ah, quite clear now.
>>
>>> You could avoid this by adding a unique constraint on the package/bundle version string in the database, and then the
>second person's publish would fail with a database error and have to be redone (and possibly re-reconciled, but I'm not
>sure about that).
>>>
>>>  
>>
>>Are you willing to AR this so that future versions would fail more
>>gracefully than with an exception (and a possible need to reconcile)?
>>
>>I'll experiment with just adding the constraint for now... duplicate
>>version numbers break our process ;-)
>
>In fact there is already an AR for it, 50360. It becomes a lot easier with the Glorpification of the underlying
>frameworks, so while I wouldn't expect it for 7.7 we might be able to manage it for the release after that.
>
>Also, that constraint would of course have to be on package/bundle name + version name. Otherwise it will disallow any
>two packages in the entire repository to have the same version name, which is probably not what you're looking for.
>--
>Alan Knight [|], Engineering Manager, Cincom Smalltalk
>[hidden email]
>[hidden email]
>http://www.cincom.com/smalltalk
>
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc