diff options
author | Christoph Fink | 2021-10-27 12:02:01 +0300 |
---|---|---|
committer | Christoph Fink | 2021-10-27 12:03:43 +0300 |
commit | f2f3f7d1c531e0e5e0710c274d1a26d953582eac (patch) | |
tree | 483a258b29a2ba9632c917cd9d1341c67c5698d9 /02-path-result-max-destinations_v6.4.patch | |
parent | b424ac130f8870313cbdf8c0b426ab45b416436c (diff) | |
download | aur-f2f3f7d1c531e0e5e0710c274d1a26d953582eac.tar.gz |
v6.4
Diffstat (limited to '02-path-result-max-destinations_v6.4.patch')
-rw-r--r-- | 02-path-result-max-destinations_v6.4.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/02-path-result-max-destinations_v6.4.patch b/02-path-result-max-destinations_v6.4.patch new file mode 100644 index 000000000000..642df6c55554 --- /dev/null +++ b/02-path-result-max-destinations_v6.4.patch @@ -0,0 +1,29 @@ +diff --unified --recursive --text a/src/main/java/com/conveyal/r5/analyst/cluster/PathResult.java b/src/main/java/com/conveyal/r5/analyst/cluster/PathResult.java +--- a/src/main/java/com/conveyal/r5/analyst/cluster/PathResult.java 2021-05-16 20:18:52.000000000 +0300 ++++ b/src/main/java/com/conveyal/r5/analyst/cluster/PathResult.java 2021-10-27 11:00:31.245320268 +0300 +@@ -32,6 +32,14 @@ + + public class PathResult { + ++ /** ++ * The maximum number of destinations for which we'll generate detailed path information in a single request. ++ * Detailed path information was added on to the original design, which returned a simple grid of travel times. ++ * These results are returned to the backend over an HTTP API so we don't want to risk making them too huge. ++ * This could be set to a higher number in cases where you know the result return channel can handle the size. ++ */ ++ public static int maxDestinations = 5000; ++ + private final int nDestinations; + /** + * Array with one entry per destination. Each entry is a map from a "path template" to the associated iteration +@@ -62,8 +70,8 @@ + // In regional analyses, return paths to all destinations + nDestinations = task.nTargetsPerOrigin(); + // This limitation reflects the initial design, for use with freeform pointset destinations +- if (nDestinations > 5000) { +- throw new UnsupportedOperationException("Path results are limited to 5000 destinations"); ++ if (nDestinations > maxDestinations) { ++ throw new UnsupportedOperationException("Number of detailed path destinations exceeds limit of " + maxDestinations); + } + } + iterationsForPathTemplates = new Multimap[nDestinations]; |