-
Notifications
You must be signed in to change notification settings - Fork 0
version 2.17.3 #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+21
−2
Merged
version 2.17.3 #370
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/resources/db/migration/V260326__Drop_duplicate_club_subscribe_index.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| SET @index_exists := ( | ||
| SELECT COUNT(*) | ||
| FROM information_schema.statistics | ||
| WHERE table_schema = DATABASE() | ||
| AND table_name = 'club_subscribe' | ||
| AND index_name = 'idx_club_subscribe_club' | ||
| ); | ||
|
|
||
| SET @sql := IF( | ||
| @index_exists > 0, | ||
| 'ALTER TABLE club_subscribe DROP INDEX idx_club_subscribe_club', | ||
| 'SELECT 1' | ||
| ); | ||
|
|
||
| PREPARE stmt FROM @sql; | ||
| EXECUTE stmt; | ||
| DEALLOCATE PREPARE stmt; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ku-ring/ku-ring-backend-web
Length of output: 380
🏁 Script executed:
cat -n scripts/start.sh | head -30Repository: ku-ring/ku-ring-backend-web
Length of output: 897
🏁 Script executed:
Repository: ku-ring/ku-ring-backend-web
Length of output: 897
JVM 옵션 순서가 잘못되어 prod 프로필과 메모리 제한이 적용되지 않습니다.
Line 22에서
-Dspring.profiles.active=prod,-Xms256m,-Xmx256m이-jar뒤에 위치하고 있습니다. Java 표준 명령 형식java [options] -jar jarfile [args...]에 따르면 JVM 옵션은-jar앞에 와야 합니다. 현재 위치에서는 이들이 jar 애플리케이션에 전달될 인자로 해석되어 JVM 옵션이 적용되지 않습니다.수정 제안
📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헐 진짜야? 그러면 그전까지 안됐어?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
JVM에 옵션을 전달하려면
-jar옵션 앞에 위치시켜야 합니다. 현재 명령어에서-Dspring.profiles.active=prod,-Xms256m,-Xmx256m은-jar뒤에 있지만 JAR 파일명(spring-webapp.jar) 앞에 있어, JVM 구현체에 따라 처리 방식이 달라질 수 있습니다.실질적인 영향:
-D로 시작하는 인자와-Xms,-Xmx같은 인자를 위치와 무관하게 인식할 수도 있어서 앱 자체는 실행됐을 가능성이 높습니다.-Xms256m/-Xmx256m메모리 제한이나-Dspring.profiles.active=prod프로필 설정이 실제로 적용되지 않았을 수도 있습니다.아래와 같이 수정하는 것을 강하게 권장합니다:
🌐 Web query:
💡 Result:
네. 저 명령은 JVM 옵션을 “무시”하는 게 아니라,
-jar뒤는 JVM 옵션 파싱 구간이 끝난 상태라서 그렇게 동작합니다.java -jar <jarfile> [args...]에서 **-jar다음 토큰(첫 번째 non-option 인자)**이 무조건 JAR 파일로 해석됩니다. 그리고 그 뒤에 오는 모든 인자는 전부 애플리케이션(main) 인자로 전달됩니다. [1][2]jarfile이-Dspring.profiles.active=prod로 잡히고,-Xms256m -Xmx256m spring-webapp.jar는 애플리케이션 인자로 넘어가는 형태가 됩니다(결과적으로 정상 실행이 어렵거나 “Unable to access jarfile …”류 에러가 날 가능성이 큼). [1][2]올바른 형태(예시):
(요약: JVM 옵션은
-jar및 JAR 파일명 앞에만 둘 수 있습니다.) [1][2]출처
java문서 (java command man page)javaman page (synopsis:java [options] -jar file.jar [args...], jar/class 뒤는 args로 전달)@rlagkswn00검색 결과를 확인하니 생각보다 더 심각한 문제였습니다.Java 런처는
-jar바로 다음에 오는 첫 번째 토큰을 무조건 JAR 파일 경로로 해석합니다. 즉, 아래 명령어에서:-Dspring.profiles.active=prod가 JAR 파일 경로로 잡히고,-Xms256m -Xmx256m spring-webapp.jar는 애플리케이션 인자로 넘어갑니다. 이 경우 "Unable to access jarfile …" 류의 오류가 발생하거나 정상 실행이 어려웠을 가능성이 큽니다.즉, 이전부터 이미 배포 스크립트가 잘못된 상태였다는 뜻입니다. (앱이 실제로 실행되고 있었다면, JVM 구현체가 관대하게 처리해줬을 수도 있지만, 표준 동작은 아닙니다.)
이번 PR에서 반드시 함께 수정하시는 것을 권장드립니다:
올바른 형태는 JVM 옵션을
-jar및 JAR 파일명 앞에만 위치시키는 것입니다:java [options] -jar file.jar [args...]There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked on prod: the service is currently running with the same command shape (
java -jar -Dspring.profiles.active=prod -Xms256m -Xmx256m ...) and the deployed bundle predates this PR, so this does not appear to be a regression introduced here. Reordering to the canonicaljava [options] -jar file.jarform could still be considered as a readability/portability cleanup, but I do not think this is a critical issue for this PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rlagkswn00, thank you for verifying this on production — that's valuable evidence.Looking at this more carefully, I overstated the severity. The Java launcher scans the full argument list for recognized JVM option prefixes (
-D,-X,-XX, etc.) even when they appear after-jarand before the JAR filename. Since-Dspring.profiles.active=prod,-Xms256m, and-Xmx256mall carry recognized JVM option prefixes, HotSpot's launcher correctly identifiesspring-webapp.jaras the first non-option argument following-jarand applies the JVM flags as intended. Your production verification confirms this: the service runs and the options are applied.The argument for reordering to
java [options] -jar file.jaris purely one of readability and portability — it matches the canonical synopsis documented by Oracle and makes the intent unambiguous to human readers and any future tooling that might parse the command. It is not a functional regression fix.I'll defer to your judgment on whether to include that cleanup in this PR or a future one. Downgrading the severity of this comment from critical.
✏️ Learnings added