Removed prefix for static functions

This commit is contained in:
Andrew Kane
2024-01-22 17:58:42 -08:00
parent a45ca414f4
commit e9a96d341f
2 changed files with 12 additions and 12 deletions

View File

@@ -331,7 +331,7 @@ FlushPages(HnswBuildState * buildstate)
* Add a heap TID to an existing element * Add a heap TID to an existing element
*/ */
static bool static bool
HnswAddDuplicateInMemory(HnswElement element, HnswElement dup) AddDuplicateInMemory(HnswElement element, HnswElement dup)
{ {
LWLockAcquire(&dup->lock, LW_EXCLUSIVE); LWLockAcquire(&dup->lock, LW_EXCLUSIVE);
@@ -352,7 +352,7 @@ HnswAddDuplicateInMemory(HnswElement element, HnswElement dup)
* Find duplicate element * Find duplicate element
*/ */
static bool static bool
HnswFindDuplicateInMemory(char *base, HnswElement element) FindDuplicateInMemory(char *base, HnswElement element)
{ {
HnswNeighborArray *neighbors = HnswGetNeighbors(base, element, 0); HnswNeighborArray *neighbors = HnswGetNeighbors(base, element, 0);
Datum value = HnswGetValue(base, element); Datum value = HnswGetValue(base, element);
@@ -368,7 +368,7 @@ HnswFindDuplicateInMemory(char *base, HnswElement element)
return false; return false;
/* Check for space */ /* Check for space */
if (HnswAddDuplicateInMemory(element, neighborElement)) if (AddDuplicateInMemory(element, neighborElement))
return true; return true;
} }
@@ -379,7 +379,7 @@ HnswFindDuplicateInMemory(char *base, HnswElement element)
* Add to element list * Add to element list
*/ */
static void static void
HnswAddElementInMemory(char *base, HnswGraph * graph, HnswElement element) AddElementInMemory(char *base, HnswGraph * graph, HnswElement element)
{ {
SpinLockAcquire(&graph->lock); SpinLockAcquire(&graph->lock);
element->next = graph->head; element->next = graph->head;
@@ -391,7 +391,7 @@ HnswAddElementInMemory(char *base, HnswGraph * graph, HnswElement element)
* Update neighbors * Update neighbors
*/ */
static void static void
HnswUpdateNeighborsInMemory(char *base, FmgrInfo *procinfo, Oid collation, HnswElement e, int m) UpdateNeighborsInMemory(char *base, FmgrInfo *procinfo, Oid collation, HnswElement e, int m)
{ {
for (int lc = e->level; lc >= 0; lc--) for (int lc = e->level; lc >= 0; lc--)
{ {
@@ -424,14 +424,14 @@ UpdateGraphInMemory(FmgrInfo *procinfo, Oid collation, HnswElement element, int
char *base = buildstate->hnswarea; char *base = buildstate->hnswarea;
/* Look for duplicate */ /* Look for duplicate */
if (HnswFindDuplicateInMemory(base, element)) if (FindDuplicateInMemory(base, element))
return; return;
/* Add element */ /* Add element */
HnswAddElementInMemory(base, graph, element); AddElementInMemory(base, graph, element);
/* Update neighbors */ /* Update neighbors */
HnswUpdateNeighborsInMemory(base, procinfo, collation, element, m); UpdateNeighborsInMemory(base, procinfo, collation, element, m);
/* Update entry point if needed (already have lock) */ /* Update entry point if needed (already have lock) */
if (entryPoint == NULL || element->level > entryPoint->level) if (entryPoint == NULL || element->level > entryPoint->level)

View File

@@ -451,7 +451,7 @@ HnswUpdateNeighborsOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, Hns
* Add a heap TID to an existing element * Add a heap TID to an existing element
*/ */
static bool static bool
HnswAddDuplicateOnDisk(Relation index, HnswElement element, HnswElement dup, bool building) AddDuplicateOnDisk(Relation index, HnswElement element, HnswElement dup, bool building)
{ {
Buffer buf; Buffer buf;
Page page; Page page;
@@ -515,7 +515,7 @@ HnswAddDuplicateOnDisk(Relation index, HnswElement element, HnswElement dup, boo
* Find duplicate element * Find duplicate element
*/ */
static bool static bool
HnswFindDuplicateOnDisk(Relation index, HnswElement element, bool building) FindDuplicateOnDisk(Relation index, HnswElement element, bool building)
{ {
char *base = NULL; char *base = NULL;
HnswNeighborArray *neighbors = HnswGetNeighbors(base, element, 0); HnswNeighborArray *neighbors = HnswGetNeighbors(base, element, 0);
@@ -531,7 +531,7 @@ HnswFindDuplicateOnDisk(Relation index, HnswElement element, bool building)
if (!datumIsEqual(value, neighborValue, false, -1)) if (!datumIsEqual(value, neighborValue, false, -1))
return false; return false;
if (HnswAddDuplicateOnDisk(index, element, neighborElement, building)) if (AddDuplicateOnDisk(index, element, neighborElement, building))
return true; return true;
} }
@@ -547,7 +547,7 @@ UpdateGraphOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, HnswElement
BlockNumber newInsertPage = InvalidBlockNumber; BlockNumber newInsertPage = InvalidBlockNumber;
/* Look for duplicate */ /* Look for duplicate */
if (HnswFindDuplicateOnDisk(index, element, building)) if (FindDuplicateOnDisk(index, element, building))
return; return;
/* Add element */ /* Add element */