mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 00:26:55 +08:00
Improved BuildCallback [skip ci]
This commit is contained in:
@@ -446,10 +446,10 @@ BuildCallback(Relation index, CALLBACK_ITEM_POINTER, Datum *values,
|
|||||||
/* Update progress */
|
/* Update progress */
|
||||||
if (inserted)
|
if (inserted)
|
||||||
{
|
{
|
||||||
if (buildstate->hnswshared)
|
HnswShared *hnswshared = buildstate->hnswshared;
|
||||||
{
|
|
||||||
HnswShared *hnswshared = buildstate->hnswshared;
|
|
||||||
|
|
||||||
|
if (hnswshared)
|
||||||
|
{
|
||||||
SpinLockAcquire(&hnswshared->mutex);
|
SpinLockAcquire(&hnswshared->mutex);
|
||||||
UpdateProgress(PROGRESS_CREATEIDX_TUPLES_DONE, ++hnswshared->indtuples);
|
UpdateProgress(PROGRESS_CREATEIDX_TUPLES_DONE, ++hnswshared->indtuples);
|
||||||
SpinLockRelease(&hnswshared->mutex);
|
SpinLockRelease(&hnswshared->mutex);
|
||||||
|
|||||||
Reference in New Issue
Block a user