Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfcfff8f

Browse files
danolivoAlena0704
authored andcommitted
Unify elog messages for the case of corrupted hash table.
1 parentbf0e8bb commitfcfff8f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

‎learn_cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ lc_flush_data(void)
293293
aqo_data_store(hdr->key.fs,hdr->key.fss,&data,reloids);
294294

295295
if (!hash_search(fss_htab, (void*)&hdr->key,HASH_REMOVE,NULL))
296-
elog(ERROR,"[AQO] Flush: local ML cache is corrupted.");
296+
elog(PANIC,"[AQO] Flush: local ML cache is corrupted.");
297297
}
298298

299299
reset_dsm_cache();
@@ -323,7 +323,7 @@ lc_assign_hook(bool newval, void *extra)
323323
while ((entry= (htab_entry*)hash_seq_search(&status))!=NULL)
324324
{
325325
if (!hash_search(fss_htab, (void*)&entry->key,HASH_REMOVE,NULL))
326-
elog(ERROR,"[AQO] The local ML cache is corrupted.");
326+
elog(PANIC,"[AQO] The local ML cache is corrupted.");
327327
}
328328
LWLockRelease(&aqo_state->lock);
329329
}

‎storage.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ aqo_stat_reset(void)
389389
hash_seq_init(&hash_seq,stat_htab);
390390
while ((entry=hash_seq_search(&hash_seq))!=NULL)
391391
{
392-
if (hash_search(stat_htab,&entry->queryid,HASH_REMOVE,NULL)==NULL)
393-
elog(ERROR,"[AQO] hash table corrupted");
392+
if (!hash_search(stat_htab,&entry->queryid,HASH_REMOVE,NULL))
393+
elog(PANIC,"[AQO] hash table corrupted");
394394
num_remove++;
395395
}
396396
aqo_state->stat_changed= true;
@@ -1226,7 +1226,7 @@ _aqo_data_remove(data_key *key)
12261226
dsa_free(data_dsa,entry->data_dp);
12271227
entry->data_dp=InvalidDsaPointer;
12281228

1229-
if (hash_search(data_htab,key,HASH_REMOVE,NULL)==NULL)
1229+
if (!hash_search(data_htab,key,HASH_REMOVE,NULL))
12301230
elog(PANIC,"[AQO] Inconsistent data hash table");
12311231

12321232
aqo_state->data_changed= true;
@@ -1257,8 +1257,8 @@ aqo_qtexts_reset(void)
12571257

12581258
Assert(DsaPointerIsValid(entry->qtext_dp));
12591259
dsa_free(qtext_dsa,entry->qtext_dp);
1260-
if (hash_search(qtexts_htab,&entry->queryid,HASH_REMOVE,NULL)==NULL)
1261-
elog(ERROR,"[AQO] hash table corrupted");
1260+
if (!hash_search(qtexts_htab,&entry->queryid,HASH_REMOVE,NULL))
1261+
elog(PANIC,"[AQO] hash table corrupted");
12621262
num_remove++;
12631263
}
12641264
aqo_state->qtexts_changed= true;
@@ -1719,8 +1719,8 @@ _aqo_data_clean(uint64 fs)
17191719
Assert(DsaPointerIsValid(entry->data_dp));
17201720
dsa_free(data_dsa,entry->data_dp);
17211721
entry->data_dp=InvalidDsaPointer;
1722-
if (hash_search(data_htab,&entry->key,HASH_REMOVE,NULL)==NULL)
1723-
elog(ERROR,"[AQO] hash table corrupted");
1722+
if (!hash_search(data_htab,&entry->key,HASH_REMOVE,NULL))
1723+
elog(PANIC,"[AQO] hash table corrupted");
17241724
removed++;
17251725
}
17261726

@@ -1746,8 +1746,8 @@ aqo_data_reset(void)
17461746
{
17471747
Assert(DsaPointerIsValid(entry->data_dp));
17481748
dsa_free(data_dsa,entry->data_dp);
1749-
if (hash_search(data_htab,&entry->key,HASH_REMOVE,NULL)==NULL)
1750-
elog(ERROR,"[AQO] hash table corrupted");
1749+
if (!hash_search(data_htab,&entry->key,HASH_REMOVE,NULL))
1750+
elog(PANIC,"[AQO] hash table corrupted");
17511751
num_remove++;
17521752
}
17531753

@@ -1886,8 +1886,8 @@ aqo_queries_reset(void)
18861886
/* Don't remove default feature space */
18871887
continue;
18881888

1889-
if (hash_search(queries_htab,&entry->queryid,HASH_REMOVE,NULL)==NULL)
1890-
elog(ERROR,"[AQO] hash table corrupted");
1889+
if (!hash_search(queries_htab,&entry->queryid,HASH_REMOVE,NULL))
1890+
elog(PANIC,"[AQO] hash table corrupted");
18911891
num_remove++;
18921892
}
18931893

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp