Skip to content

Commit 7a12279

Browse files
author
a.pervushina
committed
Fix after review
1 parent 6b4769d commit 7a12279

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

storage.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ load_aqo_data(uint64 fs, int fss, OkNNrdata *data, List **reloids,
15861586

15871587
found = false;
15881588
LWLockAcquire(&aqo_state->neighbours_lock, LW_EXCLUSIVE);
1589-
neighbour_entry = (NeighboursEntry *) hash_search(fss_neighbours, &fss, HASH_FIND, &found);
1589+
neighbour_entry = (NeighboursEntry *) hash_search(fss_neighbours, &key.fss, HASH_FIND, &found);
15901590
entry = found ? neighbour_entry->data : NULL;
15911591

15921592
/*
@@ -2120,13 +2120,8 @@ aqo_neighbours_load(void)
21202120

21212121
LWLockAcquire(&aqo_state->neighbours_lock, LW_EXCLUSIVE);
21222122

2123-
if (hash_get_num_entries(fss_neighbours) != 0)
2124-
{
2125-
/* Someone have done it concurrently. */
2126-
elog(LOG, "[AQO] Another backend have loaded neighbours data concurrently.");
2127-
LWLockRelease(&aqo_state->neighbours_lock);
2128-
return;
2129-
}
2123+
/* Load on postmaster sturtup. So no any concurrent actions possible here. */
2124+
Assert(hash_get_num_entries(fss_neighbours) == 0);
21302125

21312126
data_load(PGAQO_NEIGHBOURS_FILE, _deform_neighbours_record_cb, NULL);
21322127

0 commit comments

Comments
 (0)