Re: Multiple retired users with same name prevent import/export of db.

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Sun, Jun 06, 2021 at 03:21:27PM -0400, John P. Rouillard wrote:
> 1. Import could read an entire csv and sort properly (taking
> possibly a large amount of memory). Not a great idea IMO.
> 
> 2. Could it be handled when the exception is triggered?  When the
> exception is trigered, changing the non-retired index entry from
> (key1, 0) to (key1, -1). Then retry the failing insert.

How about inserting everything first with retired = -1 (instead of 0)
and then use 'restore' if the item is not retired (hopefully setting the
retired flag to 0) and using retire if retired (hopefully setting the
retired flag to the id). This maybe needs some relaxing of constraints
on import (and for retire) but probably would work because at every
point there is only one entry with retired=-1 in the db.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.