forked from Mirrors/privacore-open-source-search-engine
Removed 21 write-only members from Repai
This commit is contained in:
31
Repair.cpp
31
Repair.cpp
@ -75,30 +75,15 @@ static Rdb **getAllRdbs ( int32_t *nsr ) {
|
||||
|
||||
Repair::Repair() {
|
||||
// Coverity
|
||||
m_completed = false;
|
||||
m_needsCallback = false;
|
||||
m_docQuality = 0;
|
||||
m_docId = 0;
|
||||
m_isDelete = false;
|
||||
m_totalMem = 0;
|
||||
m_stage = 0;
|
||||
m_tfn = 0;
|
||||
m_count = 0;
|
||||
m_updated = false;
|
||||
m_nextTitledbKey = 0;
|
||||
m_nextSpiderdbKey = 0;
|
||||
m_nextPosdbKey = 0;
|
||||
m_nextLinkdbKey = 0;
|
||||
m_endKey = 0;
|
||||
m_uh48 = 0;
|
||||
m_priority = 0;
|
||||
m_contentHash = 0;
|
||||
m_clusterdbKey = 0;
|
||||
m_spiderdbKey = 0;
|
||||
memset(m_srBuf, 0, sizeof(m_srBuf));
|
||||
memset(m_tmpBuf, 0, sizeof(m_tmpBuf));
|
||||
m_chksum1LongLong = 0;
|
||||
m_isNew = false;
|
||||
m_SAVE_START = 0;
|
||||
m_lastDocId = 0;
|
||||
m_prevDocId = 0;
|
||||
@ -135,8 +120,6 @@ Repair::Repair() {
|
||||
m_rebuildRoots = true;
|
||||
m_rebuildNonRoots = true;
|
||||
m_collnum = 0;
|
||||
m_newCollLen = 0;
|
||||
m_newCollnum = 0;
|
||||
m_colli = 0;
|
||||
m_numColls = 0;
|
||||
m_SAVE_END = 0;
|
||||
@ -149,7 +132,6 @@ Repair::Repair() {
|
||||
m_saveRepairState = false;
|
||||
m_isRetrying = false;
|
||||
|
||||
memset(m_newColl, 0, sizeof(m_newColl));
|
||||
memset(&m_collOffs, 0, sizeof(m_collOffs));
|
||||
memset(&m_collLens, 0, sizeof(m_collLens));
|
||||
}
|
||||
@ -162,7 +144,6 @@ bool Repair::init ( ) {
|
||||
m_saveRepairState = false;
|
||||
m_isRetrying = false;
|
||||
m_needsCallback = false;
|
||||
m_completed = false;
|
||||
if( ! g_loop.registerSleepCallback( 1 , NULL , repairWrapper ) ) {
|
||||
log(LOG_WARN, "repair: Failed register callback.");
|
||||
return false;
|
||||
@ -432,9 +413,6 @@ void Repair::repairWrapper(int fd, void *state) {
|
||||
|
||||
// ready to reset
|
||||
g_repairMode = 8;
|
||||
|
||||
// mark it
|
||||
g_repair.m_completed = true;
|
||||
}
|
||||
|
||||
// go back to 0 once all hosts do not equal 5
|
||||
@ -475,10 +453,7 @@ void Repair::initScan ( ) {
|
||||
|
||||
// reset some stuff for the titledb scan
|
||||
m_nextTitledbKey.setMin();
|
||||
m_nextSpiderdbKey.setMin();
|
||||
m_lastSpiderdbKey.setMin();
|
||||
m_nextPosdbKey.setMin ();
|
||||
m_nextLinkdbKey.setMin ();
|
||||
m_endKey.setMax();
|
||||
m_titleRecList.reset();
|
||||
m_count = 0;
|
||||
@ -845,8 +820,6 @@ bool Repair::load ( ) {
|
||||
|
||||
// resume titledb scan?
|
||||
m_nextTitledbKey = m_lastTitledbKey;
|
||||
// resume spiderdb scan?
|
||||
m_nextSpiderdbKey = m_lastSpiderdbKey;
|
||||
|
||||
// reinstate the valuable vars
|
||||
m_cr = g_collectiondb.m_recs [ m_collnum ];
|
||||
@ -1243,7 +1216,6 @@ bool Repair::gotScanRecList ( ) {
|
||||
m_isDelete = false;
|
||||
// we need this to compute the tfndb key to add/delete
|
||||
//m_ext = -1;
|
||||
m_uh48 = 0LL;
|
||||
|
||||
// count the title recs we scan
|
||||
m_recsScanned++;
|
||||
@ -1304,8 +1276,6 @@ bool Repair::gotScanRecList ( ) {
|
||||
if ( m_fn == base->getNumFiles() ) id2 = 255;
|
||||
else id2 = base->m_fileIds2[m_fn];
|
||||
|
||||
// that is the tfn...
|
||||
m_tfn = id2;
|
||||
*/
|
||||
|
||||
// is it a negative titledb key?
|
||||
@ -1586,7 +1556,6 @@ bool Repair::printRepairStatus ( SafeBuf *sb , int32_t fromIp ) {
|
||||
int64_t errors2 = m_spiderRecSetErrors;
|
||||
|
||||
const char *newColl = " ";
|
||||
//if ( m_fullRebuild ) newColl = m_newColl;
|
||||
|
||||
const char *oldColl = " ";
|
||||
if ( m_cr ) oldColl = m_cr->m_coll;
|
||||
|
27
Repair.h
27
Repair.h
@ -52,43 +52,20 @@ private:
|
||||
|
||||
bool load();
|
||||
|
||||
bool m_completed;
|
||||
|
||||
// general scan vars
|
||||
Msg5 m_msg5;
|
||||
bool m_needsCallback;
|
||||
char m_docQuality;
|
||||
RdbList m_titleRecList;
|
||||
int64_t m_docId;
|
||||
bool m_isDelete;
|
||||
RdbList m_ulist;
|
||||
RdbList m_addlist;
|
||||
int64_t m_totalMem;
|
||||
int32_t m_stage ;
|
||||
int32_t m_tfn;
|
||||
int32_t m_count;
|
||||
bool m_updated;
|
||||
|
||||
// titledb scan vars
|
||||
key96_t m_nextTitledbKey;
|
||||
key96_t m_nextSpiderdbKey;
|
||||
key96_t m_nextPosdbKey;
|
||||
key128_t m_nextLinkdbKey;
|
||||
key96_t m_endKey;
|
||||
int64_t m_uh48;
|
||||
int32_t m_priority;
|
||||
uint64_t m_contentHash;
|
||||
key96_t m_clusterdbKey ;
|
||||
key96_t m_spiderdbKey;
|
||||
char m_srBuf[SR_BUFSIZE];
|
||||
char m_tmpBuf[32];
|
||||
RdbList m_linkdbListToAdd;
|
||||
uint64_t m_chksum1LongLong;
|
||||
|
||||
// spiderdb scan vars
|
||||
bool m_isNew;
|
||||
TagRec m_tagRec;
|
||||
|
||||
|
||||
// . state info
|
||||
// . indicator of what we save to disk
|
||||
@ -135,11 +112,7 @@ private:
|
||||
bool m_rebuildNonRoots ;
|
||||
|
||||
// current collection being repaired
|
||||
//int32_t m_collLen;
|
||||
collnum_t m_collnum;
|
||||
char m_newColl[MAX_COLL_LEN];
|
||||
int32_t m_newCollLen;
|
||||
collnum_t m_newCollnum;
|
||||
|
||||
// . m_colli is the index into m_colls
|
||||
// . m_colli is the index into g_collectiondb.m_recs if the list
|
||||
|
Reference in New Issue
Block a user