Edgewall Software

Ticket #4204 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Resync broken

Reported by: M.v.Kalmthout_1@… Owned by: cboos
Priority: high Milestone: 0.10.3
Component: admin/console Version: devel
Severity: normal Keywords:
Cc: trac@…, brad@…

Description

I changed the repository path so issued a trac-admin resync. Result:

Resyncing repository history...
Command failed: The 'repository_dir' has changed, a 'trac-admin resync' operation is needed.

Reverting [4303] made the resync possible again. Using 0.10.x stable at [4310]

Attachments

Change History

Changed 3 years ago by cboos

I can't reproduce the problem, neither with r4303, nor with r4310, now even trying SQLite, PostgreSQL and MySQL in turn.

Are you sure that you're using a clean install? In particular, check the following: source:branches/0.10-stable/trac/scripts/admin.py@4310#L682

  1. Check that your corresponding file matches. For that, you can insert some print statement, for example.
  2. Does adding a cnx.commit() immediately after the execute help?
    • If yes, what's your database and bindings (+ the versions used)

Changed 3 years ago by M.v.Kalmthout_1@…

I use a source installation using

./setup.py install  --force

So I think all files should be up to date ?

I changed the script as you suggest to:

        repos = self.__env.get_repository()
        cursor.execute("DELETE FROM system WHERE name='repository_dir'")
        cnx.commit()

This solves my problem IF I use the following order:

  • add 'cnx.commit()'
  • resync the repository history
  • change the 'repository_dir'
  • resync again

For your information: following order still reproduces the error

  • add 'cnx.commit()'
  • change the 'repository_dir'
  • resync

Additional info:

  • repository_dir is only changed to an 'other' scope within the previous repository.
  • Python 2.4.4 (windows)
  • pysqlite-2.3.2.win32-py2.4
  • mod_python-3.2.10.win32-py2.4-apache2.0

Let me know if I you like me to do some additional tests or provide more info.

Changed 3 years ago by Lutz Frommberger <trac@…>

  • cc trac@… added

I had the same issue with 4310 on a Debian Sarge with sqlite3. Let me know if you need more info.

Changed 3 years ago by cboos

  • owner changed from cmlenz to cboos
  • priority changed from normal to high
  • status changed from new to assigned
  • milestone set to 0.10.3

No, it's OK, I can reproduce it too now... oops ;)

Sorry for the delays.

Changed 3 years ago by cboos

Fixed in r4337 for 0.11 and r4338 for 0.10.3.

Thanks for the reports!

Changed 3 years ago by cboos

  • status changed from assigned to closed
  • resolution set to fixed

Damn, first I failed to see the problem, now I forget to close it... there's something wrong with this ticket ;)

Must be the numbers...

Changed 2 years ago by brad <brad@…>

  • cc brad@… added
  • status changed from closed to reopened
  • resolution fixed deleted

I can recreate this at r4385 in 0.10-stable branch.

> trac-admin arclib resync
Resyncing repository history...
Command failed: The 'repository_dir' has changed, a 'trac-admin resync' operation is needed.

Changed 2 years ago by cboos

Are you sure it's not an install issue, i.e. the trac/scripts/admin.py that gets used is older?

In any case, look at r4338, add a print in line 681 to check to above hypothesis. If you're really using > r4338, try to add a cnx.commit() on that line (i.e. immediately before the get_repository()).

Changed 2 years ago by anonymous

  • status changed from reopened to closed
  • resolution set to fixed

okay, I'm a blockhead. I was not fully switched over from SQLite to Postgres with this project/repos/env. When I got it back fully to PG (and noted this in trac.ini), and deleted the 'repository_dir' record from 'system', things worked fine. Sorry for the noise.

Add/Change #4204 (Resync broken)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.