Source:
<code>public void startBootstrap(RowMap startBootstrapRow, AbstractProducer producer, MaxwellReplicator replicator) throws Exception { String databaseName = ( String ) startBootstrapRow.getData("database_name"); String tableName = ( String ) startBootstrapRow.getData("table_name"); LOGGER.debug(String.format("bootstrapping request for %s.%s", databaseName, tableName)); Schema schema = replicator.getSchema(); Database database = findDatabase(schema, databaseName); Table table = findTable(tableName, database); OpenReplicator openReplicator = replicator.getOpenReplicator(); BinlogPosition position = new BinlogPosition(openReplicator.getBinlogPosition(), openReplicator.getBinlogFileName()); producer.push(startBootstrapRow); producer.push(bootstrapStartRowMap(table, position)); LOGGER.info(String.format("bootstrapping started for %s.%s, binlog position is %s", databaseName, tableName, position.toString())); try ( Connection connection = getConnection() ) { setBootstrapRowToStarted(startBootstrapRow, connection); <START> ResultSet resultSet = getAllRows(databaseName, tableName, schema, connection); <END> int insertedRows = 0; while ( resultSet.next() ) { RowMap row = new RowMap( "insert", databaseName, tableName, System.currentTimeMillis(), table.getPKList(), position); setRowValues(row, resultSet, table); LOGGER.debug("bootstrapping row : " + row.toJSON()); producer.push(row); ++insertedRows; updateInsertedRowsColumn(insertedRows, startBootstrapRow, connection); } setBootstrapRowToCompleted(insertedRows, startBootstrapRow, connection); } }</code><technical_language>pretty I understand, I wanted check: This a _single_ "select *" command, right? JDBC (may) chunk bootstrap_fetch_size chunks internally? do multiple "select *" commands? work, consistency-wise. want bootstrap a single consistent snapshot</technical_language>

Target:
public void startBootstrap(RowMap startBootstrapRow, AbstractProducer producer, MaxwellReplicator replicator) throws Exception { String databaseName = ( String ) startBootstrapRow.getData("database_name"); String tableName = ( String ) startBootstrapRow.getData("table_name"); LOGGER.debug(String.format("bootstrapping request for %s.%s", databaseName, tableName)); Schema schema = replicator.getSchema(); Database database = findDatabase(schema, databaseName); Table table = findTable(tableName, database); BinlogPosition position = startBootstrapRow.getPosition(); producer.push(startBootstrapRow); producer.push(bootstrapStartRowMap(table, position)); LOGGER.info(String.format("bootstrapping started for %s.%s, binlog position is %s", databaseName, tableName, position.toString())); try ( Connection connection = getConnection() ) { setBootstrapRowToStarted(startBootstrapRow, connection); ResultSet resultSet = getAllRows(databaseName, tableName, schema, connection); int insertedRows = 0; while ( resultSet.next() ) { RowMap row = new RowMap( "insert", databaseName, tableName, System.currentTimeMillis(), table.getPKList(), position); setRowValues(row, resultSet, table); if ( LOGGER.isDebugEnabled() ) LOGGER.debug("bootstrapping row : " + row.toJSON()); producer.push(row); ++insertedRows; updateInsertedRowsColumn(insertedRows, startBootstrapRow, position, connection); } setBootstrapRowToCompleted(insertedRows, startBootstrapRow, connection); } }