Hi,

I was looking for a reliable method to check if my core was in a consistent 
readable state and came across org.apache.lucene.index.CheckIndex class. 
However, when I tried to run this command multiple times from the command-line 
via the main utility method provided, it takes long time to run for the first 
time, while subsequent runs are much much faster. Can someone explain why this 
is? Does Solr/Lucene cache the results of CheckIndex? Note that the attempt 
runs are on the same core with same segments.

Here are the results from attempt 1:
 grep "check integrity" checkFastIndex70e0a5core7_a1.out
    test: check integrity.....OK [took 37.747 sec]
    test: check integrity.....OK [took 37.572 sec]
    test: check integrity.....OK [took 36.763 sec]
    test: check integrity.....OK [took 35.927 sec]
    test: check integrity.....OK [took 35.714 sec]
    test: check integrity.....OK [took 37.975 sec]
    test: check integrity.....OK [took 37.685 sec]
    test: check integrity.....OK [took 35.516 sec]
    test: check integrity.....OK [took 9.359 sec]
    test: check integrity.....OK [took 2.016 sec]
    test: check integrity.....OK [took 5.014 sec]
    test: check integrity.....OK [took 3.276 sec]
    test: check integrity.....OK [took 2.134 sec]
    test: check integrity.....OK [took 0.525 sec]
    test: check integrity.....OK [took 0.304 sec]
    test: check integrity.....OK [took 0.099 sec]
    test: check integrity.....OK [took 0.409 sec]
    test: check integrity.....OK [took 0.160 sec]
    test: check integrity.....OK [took 0.130 sec]
    test: check integrity.....OK [took 0.449 sec]
    test: check integrity.....OK [took 0.229 sec]
    test: check integrity.....OK [took 0.093 sec]
    test: check integrity.....OK [took 0.019 sec]
    test: check integrity.....OK [took 0.083 sec]
    test: check integrity.....OK [took 0.177 sec]
    test: check integrity.....OK [took 0.001 sec]
    test: check integrity.....OK [took 0.000 sec]
    test: check integrity.....OK [took 0.023 sec]
    test: check integrity.....OK [took 0.002 sec]
    test: check integrity.....OK [took 0.006 sec]
    test: check integrity.....OK [took 0.000 sec]

Results from attempt 2:
grep "check integrity" checkFastIndex70e0a5core7_a2.out
    test: check integrity.....OK [took 1.904 sec]
    test: check integrity.....OK [took 1.785 sec]
    test: check integrity.....OK [took 1.704 sec]
    test: check integrity.....OK [took 1.594 sec]
    test: check integrity.....OK [took 1.338 sec]
    test: check integrity.....OK [took 1.414 sec]
    test: check integrity.....OK [took 1.490 sec]
    test: check integrity.....OK [took 1.291 sec]
    test: check integrity.....OK [took 0.366 sec]
    test: check integrity.....OK [took 0.072 sec]
    test: check integrity.....OK [took 0.183 sec]
    test: check integrity.....OK [took 0.175 sec]
    test: check integrity.....OK [took 0.072 sec]
    test: check integrity.....OK [took 0.020 sec]
    test: check integrity.....OK [took 0.012 sec]
    test: check integrity.....OK [took 0.004 sec]
    test: check integrity.....OK [took 0.028 sec]
    test: check integrity.....OK [took 0.009 sec]
    test: check integrity.....OK [took 0.007 sec]
    test: check integrity.....OK [took 0.021 sec]
    test: check integrity.....OK [took 0.013 sec]
    test: check integrity.....OK [took 0.005 sec]
    test: check integrity.....OK [took 0.001 sec]
    test: check integrity.....OK [took 0.004 sec]
    test: check integrity.....OK [took 0.006 sec]
    test: check integrity.....OK [took 0.000 sec]
    test: check integrity.....OK [took 0.000 sec]
    test: check integrity.....OK [took 0.001 sec]
    test: check integrity.....OK [took 0.000 sec]
    test: check integrity.....OK [took 0.000 sec]
    test: check integrity.....OK [took 0.000 sec]

This probably falls under lucene code, so, please let me know if I have to post 
it in lucene group for an answer.

Thanks,
Shashank

Reply via email to