Skip to content

Commit

Permalink
Cosmetic; dead_letter_ttl 1->10s
Browse files Browse the repository at this point in the history
  • Loading branch information
KH committed Jul 27, 2024
1 parent b1bff91 commit 4b9fc03
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 17 deletions.
1 change: 0 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"mode": "debug",
"cwd":"${workspaceFolder}/pkg/exe/daemon",
"program": "${workspaceFolder}/pkg/exe/daemon/capidaemon.go",
"envFile": "${env:HOME}/capiaws.rc",
"args": []
},
{
Expand Down
4 changes: 3 additions & 1 deletion doc/binconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ If ca_path is empty, Go uses the host's root CA set (/usr/ssl/certs etc).
## dead_letter_ttl
x-message-ttl setting passed to amqp.Channel.QueueDeclare(). After RabbitMQ detects a message that was consumed but not handled successfully (actively rejected or not acknowledged), it places the message in the dead letter queue, where it resides for dead_letter_ttl milliseconds and RabbitMQ makes another delivery attempt.

Default: 1000 milliseconds
1s is very aggressive, may work well for small and time-critical cases. 5-10s are more reasonable values.

Default: 5000 milliseconds

Read more about [Capillaries dead-letter-exchange](qna.md#dead-letter-exchange).

Expand Down
2 changes: 1 addition & 1 deletion pkg/env/env_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (ec *EnvConfig) Deserialize(ctx context.Context, jsonBytes []byte) error {
}

if ec.DeadLetterTtl < 100 || ec.DeadLetterTtl > 3600000 { // [100ms,1hr]
ec.DeadLetterTtl = 1000
ec.DeadLetterTtl = 10000
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/exe/daemon/capidaemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"tag_and_denormalize":{}
},
"thread_pool_size": 2,
"dead_letter_ttl": 1000,
"dead_letter_ttl": 10000,
"log":{
"level": "debug"
}
Expand Down
4 changes: 2 additions & 2 deletions test/code/common/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ check_cloud_deployment()
echo See capillaries-deploy repo for details
exit 1
fi
if [ "$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT" = "" ]; then
echo Error, missing: export CAPIDEPLOY_EXTERNAL_WEBAPI_PORT=6544
if [ "$EXTERNAL_WEBAPI_PORT" = "" ]; then
echo Error, missing: export EXTERNAL_WEBAPI_PORT=6544
echo "This is the external (proxied) port of the webapi in your Capilaries cloud deployment"
echo See capillaries-deploy repo for details
exit 1
Expand Down
2 changes: 1 addition & 1 deletion test/code/fannie_mae/bigtest_cloud/2_one_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ startNodes=01_read_payments
# Run in the cloud (takes too long on 4 x c7gd.4xlarge Cassandra nodes, 16 cores each - consider a bigger setup)
# 1530s on 4 x c7gd.16xlarge Cassandra nodes, 64 cores each
check_cloud_deployment
one_daemon_run_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
one_daemon_run_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes

2 changes: 1 addition & 1 deletion test/code/fannie_mae/bigtest_cloud/4_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outDir=/tmp/capi_out/fannie_mae_bigtest
rm -f $outDir/*

check_cloud_deployment
drop_keyspace_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace
drop_keyspace_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace

aws s3 rm $cfgS3/ --recursive
aws s3 rm $inS3/ --recursive
Expand Down
2 changes: 1 addition & 1 deletion test/code/fannie_mae/quicktest_s3/2_one_run_cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ startNodes=01_read_payments

# Run in the cloud (46s on 4 x c7gd.4xlarge Cassandra nodes, 16 cores each)
check_cloud_deployment
one_daemon_run_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
one_daemon_run_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes

2 changes: 1 addition & 1 deletion test/code/fannie_mae/quicktest_s3/4_clean_cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outDir=/tmp/capi_out/fannie_mae_quicktest
rm -f $outDir/*

check_cloud_deployment
drop_keyspace_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace
drop_keyspace_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace

aws s3 rm $cfgS3/ --recursive
aws s3 rm $inS3/ --recursive
Expand Down
2 changes: 1 addition & 1 deletion test/code/lookup/bigtest_cloud/2_one_run_csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ startNodes="read_orders,read_order_items"

# Run in the cloud (23s on 4 x c7gd.4xlarge Cassandra nodes, 16 cores each)
check_cloud_deployment
one_daemon_run_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
one_daemon_run_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
2 changes: 1 addition & 1 deletion test/code/lookup/bigtest_cloud/2_one_run_parquet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ startNodes="read_orders,read_order_items"

# Run in the cloud (23s on 4 x c7gd.4xlarge Cassandra nodes, 16 cores each)
check_cloud_deployment
one_daemon_run_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
one_daemon_run_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
2 changes: 1 addition & 1 deletion test/code/lookup/bigtest_cloud/4_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ outDir=/tmp/capi_out/lookup_bigtest
rm -f $outDir/*_inner.csv $outDir/*_outer.csv $outDir/*_inner.parquet $outDir/*_outer.parquet $outDir/runs.csv

check_cloud_deployment
drop_keyspace_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace
drop_keyspace_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace

aws s3 rm $cfgS3/ --recursive
aws s3 rm $inS3/ --recursive
Expand Down
2 changes: 1 addition & 1 deletion test/code/lookup/quicktest_s3/2_one_run_cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ startNodes="read_orders,read_order_items"

# Run in the cloud (527s on 4 x c7gd.4xlarge Cassandra nodes, 16 cores each)
check_cloud_deployment
one_daemon_run_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
one_daemon_run_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
2 changes: 1 addition & 1 deletion test/code/lookup/quicktest_s3/4_clean_cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ outDir=/tmp/capi_out/lookup_quicktest
rm -f $outDir/*_inner.csv $outDir/*_outer.csv $outDir/*_inner.parquet $outDir/*_outer.parquet $outDir/runs.csv

check_cloud_deployment
drop_keyspace_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace
drop_keyspace_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace

aws s3 rm $cfgS3/ --recursive
aws s3 rm $inS3/ --recursive
Expand Down
2 changes: 1 addition & 1 deletion test/code/portfolio/bigtest_cloud/2_one_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ startNodes=1_read_accounts,1_read_txns,1_read_period_holdings
# 527s on 4 x c7gd.4xlarge Cassandra nodes, 16 cores each
# 179s on 4 x c7gd.16xlarge Cassandra nodes, 64 cores each
check_cloud_deployment
one_daemon_run_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
one_daemon_run_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace $scriptFile $paramsFile $startNodes
2 changes: 1 addition & 1 deletion test/code/portfolio/bigtest_cloud/4_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outDir=/tmp/capi_out/portfolio_bigtest
rm -f $outDir/account_period_sector_perf.parquet $outDir/account_year_perf.parquet

check_cloud_deployment
drop_keyspace_webapi 'http://'$BASTION_IP':'$CAPIDEPLOY_EXTERNAL_WEBAPI_PORT $keyspace
drop_keyspace_webapi 'http://'$BASTION_IP':'$EXTERNAL_WEBAPI_PORT $keyspace

aws s3 rm $cfgS3/ --recursive
aws s3 rm $inS3/ --recursive
Expand Down

0 comments on commit 4b9fc03

Please sign in to comment.