@@ -388,8 +388,8 @@ aqo_stat_reset(void)
388
388
hash_seq_init (& hash_seq , stat_htab );
389
389
while ((entry = hash_seq_search (& hash_seq )) != NULL )
390
390
{
391
- if (hash_search (stat_htab , & entry -> queryid , HASH_REMOVE , NULL ) == NULL )
392
- elog (ERROR , "[AQO] hash table corrupted" );
391
+ if (! hash_search (stat_htab , & entry -> queryid , HASH_REMOVE , NULL ))
392
+ elog (PANIC , "[AQO] hash table corrupted" );
393
393
num_remove ++ ;
394
394
}
395
395
aqo_state -> stat_changed = true;
@@ -1225,7 +1225,7 @@ _aqo_data_remove(data_key *key)
1225
1225
dsa_free (data_dsa , entry -> data_dp );
1226
1226
entry -> data_dp = InvalidDsaPointer ;
1227
1227
1228
- if (hash_search (data_htab , key , HASH_REMOVE , NULL ) == NULL )
1228
+ if (! hash_search (data_htab , key , HASH_REMOVE , NULL ))
1229
1229
elog (PANIC , "[AQO] Inconsistent data hash table" );
1230
1230
1231
1231
aqo_state -> data_changed = true;
@@ -1256,8 +1256,8 @@ aqo_qtexts_reset(void)
1256
1256
1257
1257
Assert (DsaPointerIsValid (entry -> qtext_dp ));
1258
1258
dsa_free (qtext_dsa , entry -> qtext_dp );
1259
- if (hash_search (qtexts_htab , & entry -> queryid , HASH_REMOVE , NULL ) == NULL )
1260
- elog (ERROR , "[AQO] hash table corrupted" );
1259
+ if (! hash_search (qtexts_htab , & entry -> queryid , HASH_REMOVE , NULL ))
1260
+ elog (PANIC , "[AQO] hash table corrupted" );
1261
1261
num_remove ++ ;
1262
1262
}
1263
1263
aqo_state -> qtexts_changed = true;
@@ -1718,8 +1718,8 @@ _aqo_data_clean(uint64 fs)
1718
1718
Assert (DsaPointerIsValid (entry -> data_dp ));
1719
1719
dsa_free (data_dsa , entry -> data_dp );
1720
1720
entry -> data_dp = InvalidDsaPointer ;
1721
- if (hash_search (data_htab , & entry -> key , HASH_REMOVE , NULL ) == NULL )
1722
- elog (ERROR , "[AQO] hash table corrupted" );
1721
+ if (! hash_search (data_htab , & entry -> key , HASH_REMOVE , NULL ))
1722
+ elog (PANIC , "[AQO] hash table corrupted" );
1723
1723
removed ++ ;
1724
1724
}
1725
1725
@@ -1745,8 +1745,8 @@ aqo_data_reset(void)
1745
1745
{
1746
1746
Assert (DsaPointerIsValid (entry -> data_dp ));
1747
1747
dsa_free (data_dsa , entry -> data_dp );
1748
- if (hash_search (data_htab , & entry -> key , HASH_REMOVE , NULL ) == NULL )
1749
- elog (ERROR , "[AQO] hash table corrupted" );
1748
+ if (! hash_search (data_htab , & entry -> key , HASH_REMOVE , NULL ))
1749
+ elog (PANIC , "[AQO] hash table corrupted" );
1750
1750
num_remove ++ ;
1751
1751
}
1752
1752
@@ -1885,8 +1885,8 @@ aqo_queries_reset(void)
1885
1885
/* Don't remove default feature space */
1886
1886
continue ;
1887
1887
1888
- if (hash_search (queries_htab , & entry -> queryid , HASH_REMOVE , NULL ) == NULL )
1889
- elog (ERROR , "[AQO] hash table corrupted" );
1888
+ if (! hash_search (queries_htab , & entry -> queryid , HASH_REMOVE , NULL ))
1889
+ elog (PANIC , "[AQO] hash table corrupted" );
1890
1890
num_remove ++ ;
1891
1891
}
1892
1892
0 commit comments