From a069e18fe43fb23f198ff8aaae08023c2df26c16 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 22 Jan 2024 16:48:50 -0800 Subject: [PATCH] Improved function names [skip ci] --- src/hnswbuild.c | 8 ++++---- src/hnswinsert.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hnswbuild.c b/src/hnswbuild.c index ee90a6c..04ec4a3 100644 --- a/src/hnswbuild.c +++ b/src/hnswbuild.c @@ -415,10 +415,10 @@ HnswUpdateNeighborsInMemory(char *base, FmgrInfo *procinfo, Oid collation, HnswE } /* - * Write changes in memory + * Apply changes in memory */ static void -WriteElementInMemory(FmgrInfo *procinfo, Oid collation, HnswElement element, int m, int efConstruction, HnswElement entryPoint, HnswBuildState * buildstate, bool updateEntryPoint) +ApplyChangesInMemory(FmgrInfo *procinfo, Oid collation, HnswElement element, int m, int efConstruction, HnswElement entryPoint, HnswBuildState * buildstate, bool updateEntryPoint) { HnswGraph *graph = buildstate->graph; char *base = buildstate->hnswarea; @@ -475,8 +475,8 @@ InsertTupleInMemory(HnswBuildState * buildstate, HnswElement element) /* Insert element in graph */ HnswInsertElement(base, element, entryPoint, NULL, procinfo, collation, m, efConstruction, false); - /* Write to memory */ - WriteElementInMemory(procinfo, collation, element, m, efConstruction, entryPoint, buildstate, updateEntryPoint); + /* Apply changes in memory */ + ApplyChangesInMemory(procinfo, collation, element, m, efConstruction, entryPoint, buildstate, updateEntryPoint); /* Release entry lock */ LWLockRelease(entryLock); diff --git a/src/hnswinsert.c b/src/hnswinsert.c index 1a92ef3..ceca5db 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -539,10 +539,10 @@ HnswFindDuplicateOnDisk(Relation index, HnswElement element, bool building) } /* - * Write changes to disk + * Apply changes on disk */ static void -WriteElement(Relation index, FmgrInfo *procinfo, Oid collation, HnswElement element, int m, int efConstruction, HnswElement entryPoint, bool building) +ApplyChangesOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, HnswElement element, int m, int efConstruction, HnswElement entryPoint, bool building) { BlockNumber newInsertPage = InvalidBlockNumber; @@ -611,8 +611,8 @@ HnswInsertTupleOnDisk(Relation index, Datum value, Datum *values, bool *isnull, /* Insert element in graph */ HnswInsertElement(base, element, entryPoint, index, procinfo, collation, m, efConstruction, false); - /* Write to disk */ - WriteElement(index, procinfo, collation, element, m, efConstruction, entryPoint, building); + /* Apply changes on disk */ + ApplyChangesOnDisk(index, procinfo, collation, element, m, efConstruction, entryPoint, building); /* Release lock */ UnlockPage(index, HNSW_UPDATE_LOCK, lockmode);