Re: Renaming a folder while the connection dissapears



I fixed the IDLE stop problem. A remaining problem is that two extra
RENAMEs are happening:

(36, 36) -> B00034 RENAME INBOX.200 INBOX.200b
(.., ..) <- B00034 NO Mailbox does not exist
(38, 38) -> B00035 RENAME INBOX.2000 INBOX.200b.

Those are too much (and I don't know nor understand why they are being
renamed, or where they are coming from? Sounds like a real mistake in
the recursive calling).

tny_folder_copy: rename INBOX/200 to INBOX/200b
Sending DONE in camel_imap_store_stop_idle (no current folder?)
(30, 30) -> B00031 UNSUBSCRIBE INBOX.200

(.., ..) <- B00030 OK Completed
unsolitcited: B00031 OK Completed
(21, 21) -> B00032 SELECT INBOX

(.., ..) <- * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
(.., ..) <- * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted
\Seen \*)]  
(.., ..) <- * 0 EXISTS
(.., ..) <- * 0 RECENT
(.., ..) <- * OK [UIDVALIDITY 1183292297]  
(.., ..) <- * OK [UIDNEXT 1]  
(.., ..) <- * OK [NOMODSEQ] Sorry, modsequences have not been enabled on
this mailbox
(.., ..) <- * OK [URLMECH INTERNAL]
(.., ..) <- B00032 OK [READ-WRITE] Completed
(36, 36) -> B00033 RENAME INBOX.200 INBOX.200b

(.., ..) <- * OK rename user.tnytest.200 user.tnytest.200b
(.., ..) <- B00033 OK Completed
(36, 36) -> B00034 RENAME INBOX.200 INBOX.200b

(.., ..) <- B00034 NO Mailbox does not exist
(38, 38) -> B00035 RENAME INBOX.2000 INBOX.200b.

(.., ..) <- B00035 NO Invalid mailbox name
(27, 27) -> B00036 LIST "" INBOX.200b

(.., ..) <- * LIST (\HasNoChildren) "." "INBOX.200b"
(.., ..) <- B00036 OK Completed (0.000 secs 2 calls)
(27, 27) -> B00037 LSUB "" INBOX.200b

(.., ..) <- B00037 OK Completed (0.000 secs 1 calls)
(36, 36) -> B00038 LIST "" {12+}
INBOX.200b.%

(.., ..) <- B00038 OK Completed (0.000 secs 1 calls)
(36, 36) -> B00039 LSUB "" {12+}
INBOX.200b.%

(.., ..) <- B00039 OK Completed (0.000 secs 1 calls)
camel_imap_folder_stop_idle
tny_folder_copy: observers notify folder-del 200
camel_imap_folder_start_idle
tny_folder_copy: observers notify folder-add 200b


On Mon, 2007-07-02 at 20:48 +0200, Philip Van Hoof wrote:
> This is the transcript of an online rename.
> 
> There are various things going wrong here.
> 
> ps. Hve we actually ever tested this latest code? I remember it once
> working ... 
> 
> Sending DONE in camel_imap_store_stop_idle (no current folder?)
> (21, 21) -> B00031 SELECT INBOX
> 
> (.., ..) <- B00030 OK Completed
> (36, 36) -> B00032 RENAME INBOX.100 INBOX.100b
> 
> (.., ..) <- * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
> (.., ..) <- * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted
> \Seen \*)]  
> (.., ..) <- * 0 EXISTS
> (.., ..) <- * 0 RECENT
> (.., ..) <- * OK [UIDVALIDITY 1183292297]  
> (.., ..) <- * OK [UIDNEXT 1]  
> (.., ..) <- * OK [NOMODSEQ] Sorry, modsequences have not been enabled on
> this mailbox
> (.., ..) <- * OK [URLMECH INTERNAL]
> (.., ..) <- B00031 OK [READ-WRITE] Completed
> (36, 36) -> B00033 RENAME INBOX.100 INBOX.100b
> 
> (.., ..) <- * OK rename user.tnytest.100 user.tnytest.100b
> (.., ..) <- B00032 OK Completed
> unsolitcited: B00033 NO Mailbox does not exist
> (38, 38) -> B00034 RENAME INBOX.1000 INBOX.100b.
> 
> (.., ..) <- B00034 NO Invalid mailbox name
> (40, 40) -> B00035 RENAME INBOX.10000 INBOX.100b.0
> 
> (.., ..) <- * OK rename user.tnytest.10000 user.tnytest.100b.0
> (.., ..) <- B00035 OK Completed
> (27, 27) -> B00036 LIST "" INBOX.100b
> 
> (.., ..) <- * LIST (\HasChildren) "." "INBOX.100b"
> (.., ..) <- B00036 OK Completed (0.000 secs 3 calls)
> (27, 27) -> B00037 LSUB "" INBOX.100b
> 
> (.., ..) <- * LSUB () "." "INBOX.100b"
> (.., ..) <- B00037 OK Completed (0.010 secs 2 calls)
> (36, 36) -> B00038 LIST "" {12+}
> INBOX.100b.%
> 
> (.., ..) <- * LIST (\HasNoChildren) "." "INBOX.100b.0"
> (.., ..) <- B00038 OK Completed (0.000 secs 2 calls)
> (36, 36) -> B00039 LSUB "" {12+}
> INBOX.100b.%
> 
> (.., ..) <- B00039 OK Completed (0.000 secs 1 calls)
> camel_imap_folder_stop_idle
> camel_imap_folder_stop_idle
> tny_folder_copy: observers notify folder-del 100
> camel_imap_folder_start_idle
> tny_folder_copy: observers notify folder-add 100b
> camel_imap_folder_start_idle
> tny_folder_copy: observers notify folder-add 0
> 
> On Mon, 2007-07-02 at 20:24 +0200, Philip Van Hoof wrote:
> > The test was renaming a folder while the connection is broken.
> > 
> > I was surprised to see the "recurse copy" and "create" to still happen,
> > even though Tinymail has detected that we're offline at that moment.
> > 
> > Somebody should review the error handling in recurse_copy in
> > tny-camel-folder.c. Maybe, though, it's just "retries" and the debugging
> > line being printed very early. The end result was okay, by the way. No
> > folder got moved or copied. Locally nothing "too much" happened either:
> > 
> > pvanhoof schtrumpf:~/repos/tinymail/trunk$ ls /home/pvanhoof/.tinymail/mail/imap/10.84.78.89/folders/INBOX/subfolders/
> > 100  1000
> > pvanhoof schtrumpf:~/repos/tinymail/trunk$ 
> > 
> > I marked the lines that surprised me with "-->" 's
> > 
> > I added Sergio in CC because he worked with me on the implementation.
> > 
> > 
> > camel_imap_folder_start_idle
> > (.., ..) -> B00013 IDLE | in idle_real_start
> > (.., ..) <- + idling | in idle_real_start
> > idle_thread
> > idle_thread starting (B00013)
> > idle_deal_with_stuff
> > (6, 8) -> DONE | Sending DONE in idle_deal_with_stuff (nb)
> > (.., ..) -> B00014 IDLE | in idle_real_start
> > (.., ..) <- + idling | in idle_real_start
> > idle checked in idle_thread, waiting 20s for new check
> > tny_folder_copy: rename INBOX/100 to INBOX/100b
> > Sending DONE in camel_imap_store_stop_idle (no current folder?)
> > (21, 21) -> B00015 SELECT INBOX
> > 
> > imap_disconnect_online
> > imap_disconnect_offline
> > TNY_DEBUG: Local test disconnected 
> > --> tny_folder_copy: recurse_copy
> > --> tny_folder_copy: create 100b
> > imap_connect_online
> > TNY_DEBUG: Local test failed connecting 
> > CON EVENT FOR Local test: con broken
> > CON EVENT FOR Local test: con broken
> > 
> > pvanhoof schtrumpf:~/repos/tinymail/trunk$
> > 
-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







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