Skip to content

Commit

Permalink
fixed fillBandwidth() function
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyUss committed Jul 8, 2017
1 parent 936501c commit df89e4e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/DataPipeManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ const fillBandwidth = (self, currentIndex) => {
continue;
}

if (self._dataChunkSize === bandwidth) {
if (self._dataChunkSize >= bandwidth) {
/*
* Currently, the bandwidth is equal to "data_chunk_size".
* Currently, the "data_chunk_size" is greater or equal to the bandwidth.
* This means, that no more data chunks can be processed during current COPY operation.
* Current COPY operation will be performed with full bandwidth capacity.
* Current COPY operation will be performed with maximal possible bandwidth capacity.
*/
dataChunkIndexes.push(i);
self._dataPool[i]._processed = true;
Expand Down Expand Up @@ -203,10 +203,11 @@ module.exports = self => {
return processConstraints(self);
}

const currentIndex = 0;
const strDataLoaderPath = path.join(__dirname, 'DataLoader.js');
const options = self._loaderMaxOldSpaceSize === 'DEFAULT'
? Object.create(null)
: { execArgv: ['--max-old-space-size=' + self._loaderMaxOldSpaceSize] };

return pipeData(self, strDataLoaderPath, options, 0);
return pipeData(self, strDataLoaderPath, options, currentIndex);
};

0 comments on commit df89e4e

Please sign in to comment.