View | Details | Raw Unified | Return to bug 33309
Collapse All | Expand All

(-)a/C4/Circulation.pm (-1 / +5 lines)
Lines 3161-3167 sub AddRenewal { Link Here
3161
        $renews = ( $item_object->renewals || 0 ) + 1;
3161
        $renews = ( $item_object->renewals || 0 ) + 1;
3162
        $item_object->renewals($renews);
3162
        $item_object->renewals($renews);
3163
        $item_object->onloan($datedue);
3163
        $item_object->onloan($datedue);
3164
        $item_object->store({ log_action => 0 });
3164
        # Don't index as we are in a transaction
3165
        $item_object->store({ log_action => 0, skip_record_index => 1 });
3165
3166
3166
        # Charge a new rental fee, if applicable
3167
        # Charge a new rental fee, if applicable
3167
        my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber );
3168
        my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber );
Lines 3246-3251 sub AddRenewal { Link Here
3246
            }
3247
            }
3247
        });
3248
        });
3248
    });
3249
    });
3250
    # We index now, after the transaction is committed
3251
    my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX });
3252
    $indexer->index_records( $item_object->biblionumber, "specialUpdate", "biblioserver" );
3249
3253
3250
    return $datedue;
3254
    return $datedue;
3251
}
3255
}
(-)a/Koha/Item.pm (-5 lines)
Lines 70-79 Koha::Item - Koha Item object class Link Here
70
70
71
$params can take an optional 'skip_record_index' parameter.
71
$params can take an optional 'skip_record_index' parameter.
72
If set, the reindexation process will not happen (index_records not called)
72
If set, the reindexation process will not happen (index_records not called)
73
74
NOTE: This is a temporary fix to answer a performance issue when lot of items
75
are added (or modified) at the same time.
76
The correct way to fix this is to make the ES reindexation process async.
77
You should not turn it on if you do not understand what it is doing exactly.
73
You should not turn it on if you do not understand what it is doing exactly.
78
74
79
=cut
75
=cut
80
- 

Return to bug 33309