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

Re: UIDVALIDITY check fails



> On 25 Aug 1998 00:11:50 +0200 Mats Lidell <Mats.Lidell@contactor.se> wrote:

> > With "nnimap 0.3.27" I get UIDVALIDITY check fail message in the
> > minibuffer. (Two huge and different numbers are displayed as well. I
> > guess to tell me that something is messed up.) Nothing is logged
> > though. The *imap-log* buffer seems Ok to me at least.

> > This goes for all my nnimap folders. The folders can't be accessed. A
> > real show stopper. :-(

As long as the UIDVALIDITY is constant, we can rely on message numbers
(UIDs) to be valid.  When it changes we essentially have to kill our
cache of any message data and resync.  Except, currently we just print
a message and do nothing, essentially refusing to allow access :-(.
Yes, this is obviously sub-optimal.

With the patch below we should ignore everything until the group
is reopened and we resync.

> If the UIDVALIDITY being returned is greater than 2^28 (268435456) then 
> the value is likely getting treated as an integer somewhere inside the lisp code. 
> (I'm still running 3.13 so I don't know what the current code does.)

> Since the client only uses UIDVALIDITY for comparison purposes we should be 
> able to just treat it as a string and do string comparisons. To be safe, 
> redundent leading zero's should be stripped from anything representing a 
> UIDVALIDITY.

We have always used strings as UIDVALIDITYs seem to be, more often
than not, too big for emacs.

-Jim

Index: nnimap.el
===================================================================
RCS file: /home/radford/src/cvs/nnimap/nnimap.el,v
retrieving revision 1.51
diff -u -r1.51 nnimap.el
--- nnimap.el	1998/08/23 16:29:41	1.51
+++ nnimap.el	1998/08/25 06:51:56
@@ -781,14 +781,20 @@
   
 (deffoo nnimap-request-update-info (group info &optional server silly)
   (when silly
+    ;; We reset the uidvalidity here because we are about to do a full
+    ;; resync.	Yes, I know, this precludes any other params ;-) ???
+    (gnus-info-set-params info '((uidvalidity . nil)) t)
+
     (when (nnimap-possibly-change-group group server) ;; SELECT
       (with-current-buffer nnimap-server-buffer
 	(gnus-message 5 "Updating info for mailbox %s" group)
 	
 	;; extend info to have parameters (otherwise when we set them, 
 	;; they don't get set)
-	(or (gnus-info-params info) 
-	    (gnus-info-set-params info nil t))
+	;;(unless (gnus-info-params info) 
+	;;  (gnus-info-set-params info nil t))
+	;; We don't have to do the above since we extend below now.
+	;; Remove me After testing. ???
 	
 	;; Replace list of read and marked articles with authoritative
 	;; data from server