epugh commented on code in PR #5306:
URL: https://github.com/apache/solr/pull/5306#discussion_r4539263491


##########
solr/bin/solr:
##########
@@ -636,6 +637,15 @@ fi
 
 # Everything below here is to support start, stop and restart.
 
+if [[ "$SCRIPT_CMD" == "start" ]]; then
+  for example_arg in "$@"; do
+    if [[ "$example_arg" == "-e" || "$example_arg" == "--example" ]]; then

Review Comment:
   Traced the execution order carefully: the $EXAMPLE variable set by the later 
check (the one you linked) is only populated by the full option-parsing loop, 
which runs *after* the ulimit-check block right below this one. So moving the 
`export SOLR_ULIMIT_CHECKS=false` line down there would be a no-op — the ulimit 
warning would already have printed by the time we get there. Left the loop 
as-is but added a comment explaining why, so future readers (including future 
me) don't wonder the same thing.



##########
solr/bin/solr:
##########
@@ -636,6 +637,15 @@ fi
 
 # Everything below here is to support start, stop and restart.
 
+if [[ "$SCRIPT_CMD" == "start" ]]; then
+  for example_arg in "$@"; do
+    if [[ "$example_arg" == "-e" || "$example_arg" == "--example" ]]; then

Review Comment:
   Confirmed intentional, and it applies to every example (not just secure) — 
`test_example.bats`'s new "examples suppress resource limit warnings..." test 
explicitly checks this for `-e films` too. Reasoning: ulimit checks matter for 
production-scale clusters; a throwaway local example doesn't need the warning 
noise.



##########
solr/packaging/test/test_example.bats:
##########
@@ -50,3 +50,17 @@ teardown() {
   run curl "http://localhost:${SOLR2_PORT}/solr/admin/info/properties";
   assert_output --partial 'helloworld'
 }
+
+@test "examples suppress resource limit warnings while ordinary starts retain 
them" {

Review Comment:
   Same answer as the sibling comment on solr/bin/solr: it's intentional for 
every example, not secure-specific — ulimit checks matter for production 
clusters, not throwaway local examples. This test locks that behavior in.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to