Show
Ignore:
Timestamp:
26.06.2017 16:01:43 (15 months ago)
Author:
ak19
Message:

Two fixes Kathy requested: 1. when running buildcol, ONLY deactivate a collection surrounding the lock-sensitive make_infodatabase() calls IF incremental. 2. Allow buildcol.pl to accept activate parameters like library_url (library_name and skipactivation). full-(re)build and incremental-(re)build scripts already accept additional parameters such as with -activate:skipactivation, but buildcol.pl doesn't work that way.

Files:
1 modified

Legend:

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

    r30523 r31753  
    676676    map { local $_=$_; $_->build_indexes($indexname, $indexlevel); } @builders; 
    677677 
    678     # Need to deactivate the collection for collections whose db don't support concurrent R+W 
     678    # If incremental, need to deactivate the collection for collections whose db don't support concurrent R+W 
    679679    # All except the collection (1st parameter) can be empty. For GS3, also set the site parameter 
    680680    my $gsserver = new servercontrol( $self->get_collection(), $self->{'site'}, $self->{'verbosity'}, $self->{'builddir'}, $self->{'indexdir'}, $self->{'collectdir'}, $self->{'library_url'}, $self->{'library_name'}); 
    681681 
    682     # when incrementally rebuilding a collection using any db that doesn't support concurrent 
     682    # when *incrementally* rebuilding a collection using any db that *doesn't* support concurrent 
    683683    # read and write (e.g. gdbm), need to deactivate the collection before make_infodatabase()     
    684684    map {  
     
    689689        my $dbSupportsConcurrentRW = &dbutil::supportsConcurrentReadAndWrite($infodbtype); 
    690690     
    691         if(!$dbSupportsConcurrentRW) { 
     691        if(!$dbSupportsConcurrentRW && $self->{'incremental'}) { 
    692692        $gsserver->print_task_msg("About to deactivate collection ".$self->get_collection()); 
    693693        $gsserver->do_deactivate();      
     
    713713    local $_=$_; 
    714714 
    715     # when incrementally rebuilding a collection using any db that doesn't support concurrent 
     715    # when *incrementally* rebuilding a collection using any db that *doesn't* support concurrent 
    716716    # read and write (e.g. gdbm), need to deactivate the collection before make_infodatabase() 
    717717 
     
    720720        my $dbSupportsConcurrentRW = &dbutil::supportsConcurrentReadAndWrite($infodbtype); 
    721721     
    722         if(!$dbSupportsConcurrentRW) { 
     722        if(!$dbSupportsConcurrentRW && $self->{'incremental'}) { 
    723723        $gsserver->print_task_msg("About to deactivate collection ".$self->get_collection()); 
    724724        $gsserver->do_deactivate();