Ignore:
Timestamp:
05/09/16 17:19:13 (5 years ago)
Author:
ak19
Message:

Related to previous commit. Need to similarly handle another case of make_infodatabase().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/buildcolutils.pm

    r30517 r30518  
    1 ###############################################################################
     1##############################################################################
    22#
    33# buildcolutils.pm -- index and build the collection. The buildtime counterpart
     
    675675    map { local $_=$_; $_->build_indexes($indexname, $indexlevel); } @builders;
    676676
    677     # when incrementally rebuilding a collection using a gdbm database, need to
    678     # deactivate the collecitob before make_infodatabase()
     677    # when incrementally rebuilding a collection using any db that doesn't support concurrent
     678    # read and write (e.g. gdbm), need to deactivate the collection before make_infodatabase()   
    679679    map {
    680680    local $_=$_;
     
    707707  elsif ($mode =~ /^infodb$/i)
    708708  {
    709     map { local $_=$_; $_->make_infodatabase(); } @builders;
     709    map {
     710    local $_=$_;
     711
     712    # when incrementally rebuilding a collection using any db that doesn't support concurrent
     713    # read and write (e.g. gdbm), need to deactivate the collection before make_infodatabase()
     714
     715    if($_->supports_make_infodatabase()) {
     716        my $infodbtype = $_->{'infodbtype'};
     717        my $dbSupportsConcurrentRW = &dbutil::supportsConcurrentReadAndWrite($infodbtype);
     718   
     719        if(!$dbSupportsConcurrentRW) {
     720        $self->activate_collection("just_deactivate");     
     721        }
     722        $_->make_infodatabase();
     723    }
     724    } @builders;
    710725  }
    711726  else
Note: See TracChangeset for help on using the changeset viewer.