Skip to content

Commit

Permalink
enabled gdal multirange
Browse files Browse the repository at this point in the history
  • Loading branch information
elidwa committed Oct 12, 2023
1 parent 1c41114 commit fdc10a7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/geo/geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,20 +183,16 @@ static void configGDAL(void)
* which is not supported by a majority of servers (including AWS S3 or Google GCS).
* SERIAL means that each range will be requested sequentially.
* YES means that each range will be requested in parallel, using HTTP/2 multiplexing or several HTTP connections.
*
* NOTE: if set to YES, multirange reads cause errors when multiple reader threads read their data sets.
* Perfromed tests with 200 reader threads each reading 16MB and on average 14 to 16 readers failed.
* setting it to SERIAL fixed the problem.
*/
CPLSetConfigOption("GDAL_HTTP_MULTIRANGE", "SERIAL");
CPLSetConfigOption("GDAL_HTTP_MULTIRANGE", "YES");

/*
* Tells GDAL to merge consecutive range GET requests.
* GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=[YES/NO]: Defaults to NO.
* Only applies when GDAL_HTTP_MULTIRANGE is YES.
* Defines if ranges of a single ReadMultiRange() request that are consecutive should be merged into a single request.
*/
CPLSetConfigOption("GDAL_HTTP_MERGE_CONSECUTIVE_RANGES", "NO");
CPLSetConfigOption("GDAL_HTTP_MERGE_CONSECUTIVE_RANGES", "YES");

/*
* When set to YES, this attempts to download multiple range requests in parallel, reusing the same TCP connection.
Expand Down

0 comments on commit fdc10a7

Please sign in to comment.