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

Commitbe3aea1

Browse files
author
Alexandra Pervushina
committed
fix key size
1 parent12f7775 commitbe3aea1

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

‎aqo_shared.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ aqo_init_shmem(void)
244244
&info,HASH_ELEM |HASH_BLOBS);
245245

246246
/* Shared memory hash table for fss neighbours */
247-
info.keysize=sizeof(int);
247+
info.keysize=sizeof(int64);
248248
info.entrysize=sizeof(DataEntry*);
249249
fss_neighbours=ShmemInitHash("AQO fss neighbours HTAB",fss_max_items,fss_max_items,
250250
&info,HASH_ELEM |HASH_BLOBS);

‎storage.c‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ aqo_data_store(uint64 fs, int fss, OkNNrdata *data, List *reloids)
13931393
if (!found) {
13941394
LWLockAcquire(&aqo_state->neighbours_lock,LW_EXCLUSIVE);
13951395

1396-
prev= (NeighboursEntry*)hash_search(fss_neighbours,&fss,HASH_ENTER,&found);
1396+
prev= (NeighboursEntry*)hash_search(fss_neighbours,&key.fss,HASH_ENTER,&found);
13971397
if (!found)
13981398
{
13991399
entry->list.prev=NULL;
@@ -1754,7 +1754,7 @@ _aqo_data_clean(uint64 fs)
17541754
dsa_free(data_dsa,entry->data_dp);
17551755
entry->data_dp=InvalidDsaPointer;
17561756

1757-
/* fixfs list */
1757+
/* fixneighbour list */
17581758
if (entry->list.next)
17591759
has_next= true;
17601760
if (entry->list.prev)
@@ -2100,11 +2100,14 @@ aqo_neighbours_reset(void)
21002100
elog(ERROR,"[AQO] hash table corrupted");
21012101
num_remove++;
21022102
}
2103-
aqo_state->neighbours_changed= true;
2103+
2104+
if (num_remove>0)
2105+
aqo_state->neighbours_changed= true;
2106+
21042107
LWLockRelease(&aqo_state->neighbours_lock);
21052108

21062109
if (num_remove!=num_entries)
2107-
elog(ERROR,"[AQO]Neighbour memory storage is corrupted or parallel access without a lockwas detected.");
2110+
elog(ERROR,"[AQO]Neighbours memory storage is corrupted or parallel access without a lockhas detected.");
21082111

21092112
returnnum_remove;
21102113
}
@@ -2232,7 +2235,7 @@ cleanup_aqo_database(bool gentle, int *fs_num, int *fss_num)
22322235
DataEntry*entry;
22332236
NeighboursEntry*fss_htab_entry;
22342237

2235-
/* fixfs list */
2238+
/* fixneighbours list */
22362239
entry= (DataEntry*)hash_search(data_htab,&key,HASH_FIND,&found);
22372240
if (found)
22382241
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp