Detecting corrupted index

jda jda at his.com
Tue Aug 30 07:34:21 CDT 2011


>
>>  If I could detect that only the index was the problem I could just
>>  force a reindex and the user wouldn't be aware that there ever was a
>>  problem. The question is, how to do this?
>
>I see
>
>Well, except to write some search in the diagnose report
>I do not see ways
>
>
>>  I could have Valentina write the diagnose report to a temporary file
>>  and read the file. But I'd have to be sure that the *only* thing
>>  wrong was an index problem. I would prefer that this be automatic
>>  (e.g. a diagnose that didn't give back a text file in English, but
>>  rather something more machine friendly), but since that's not
>>  possible, what you you, or anyone, recommend? What should I look for
>>  in the text of this file that would tell me:
>>
>>  1. The db is OK *except*
>>  2. There is some problem with one or more indexes (so Reindex).
>
>And this should stay on old v3 yes?
>

Hi Ruslan,

If I understand your question, then no, I'd expect any new options to 
be 4.9.x or 5.x. Ideally, I'd like to do a diagnose and instead of 
getting a boolean (no problems/problems), I'd like more information 
returned. At the very least it would be helpful to know where the 
problems were found: indexes, tables, database. If only indexes have 
a problem, I would just need to reindex, no need to clone.

Right now, as I said, I would have to

1. Diagnose -> write to temp folder
2. Open the temp file and read it in
3. Search for problem message. If found, parse to find out where the 
problem(s) were found.

The last step is the hardest, because the file is in text and I don't 
know all the error messages that could be used to describe index 
problems (do you?).

Anyway, I think my first suggestion would cut down on users reporting 
database corruption -- they wouldn't need to be alerted to a problem, 
the reindexing would be transparent to them.

What do you think?

Jon


More information about the Valentina mailing list