Skip to content

Commit

Permalink
refactor(lassie): lower block limit, default depth=1
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahhoward committed Mar 20, 2023
1 parent 41018cc commit 7dd21f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion container/shim/src/fetchers/lassie.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,17 @@ export async function respondFromLassie(req, res, { cidObj, format }) {
newKey = "depthType";
newVal = "shallow";
}
if (key === "depth" && val === "all") {
newKey = "depthType";
newVal = "full";
}
lassieUrl.searchParams.set(newKey, toUtf8(newVal));
}
lassieUrl.searchParams.set("format", "car");

// if no depth type set, default to shallow
if (!lassieUrl.searchParams.get("depthType")) {
lassieUrl.searchParams.set("depthType", "shallow");
}
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), LASSIE_TIMEOUT);

Expand Down
2 changes: 1 addition & 1 deletion container/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export LASSIE_PORT=7766
export LASSIE_ORIGIN=http://127.0.0.1:$LASSIE_PORT
export LASSIE_EVENT_RECORDER_INSTANCE_ID="$(cat /usr/src/app/shared/nodeId.txt)"
export LASSIE_TEMP_DIRECTORY=/usr/src/app/shared/lassie
export LASSIE_MAX_BLOCKS_PER_REQUEST=10000
export LASSIE_MAX_BLOCKS_PER_REQUEST=10
export LASSIE_LIBP2P_CONNECTIONS_LOWWATER=2000
export LASSIE_LIBP2P_CONNECTIONS_HIGHWATER=3000
export LASSIE_CONCURRENT_SP_RETRIEVALS=1
Expand Down

0 comments on commit 7dd21f9

Please sign in to comment.