Project

General

Profile

« Previous | Next » 

Revision 2920

bin/map: connect_db(): Autocommit in commit mode to avoid the need for manual commits. This should also reduce the time that table locks are held, to avoid unnecessary contention when multiple processes are trying to insert into the same output table. (The program always uses nested transactions to support rollbacks, so there is no problem autocommitting whenever a top-level nested transaction or top-level query completes.)

View differences:

map
132 132
    
133 133
    def connect_db(db_config):
134 134
        log('Connecting to '+sql.db_config_str(db_config))
135
        return sql.connect(db_config, caching=cache_sql,
135
        return sql.connect(db_config, caching=cache_sql, autocommit=commit,
136 136
            debug_temp=verbosity > 3 and commit, log_debug=log_debug)
137 137
    
138 138
    if end != None: end_str = str(end-1) # end is one past the last #

Also available in: Unified diff