Improved BuildCallback [skip ci]

This commit is contained in:
Andrew Kane
2023-12-30 20:55:29 -05:00
parent d87bcd2deb
commit cae630784b

View File

@@ -446,10 +446,10 @@ BuildCallback(Relation index, CALLBACK_ITEM_POINTER, Datum *values,
/* Update progress */
if (inserted)
{
if (buildstate->hnswshared)
{
HnswShared *hnswshared = buildstate->hnswshared;
HnswShared *hnswshared = buildstate->hnswshared;
if (hnswshared)
{
SpinLockAcquire(&hnswshared->mutex);
UpdateProgress(PROGRESS_CREATEIDX_TUPLES_DONE, ++hnswshared->indtuples);
SpinLockRelease(&hnswshared->mutex);