-
Notifications
You must be signed in to change notification settings - Fork 331
KTOR-8110 Document deferred session retrieval #655
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
Conversation
WalkthroughA new section titled "Deferred session retrieval" was added to the server sessions documentation. This section explains the default session retrieval behavior in Ktor and introduces an option to defer session loading by setting a specific system property, providing details on how to enable this optimization. Changes
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
topics/server-sessions.md (2)
228-228
: Add an explicit{id}
anchor for consistency with the other sectionsAll previous top-level subsections specify an
{id="…"}
anchor. Adding it here keeps the documentation’s deep-link URLs predictable and avoids future broken cross-references.-## Deferred session retrieval +## Deferred session retrieval {id="deferred_session_retrieval"}
234-238
: Clarify when and how to set the system property
- Mention that the property must be set before the
embeddedServer { … }
block starts so that the plugin picks it up.- Show the more common
-D
JVM flag alternative, which is easier to use in production than callingSystem.setProperty
in code.```kotlin -System.setProperty("io.ktor.server.sessions.deferred", "true") +// Must be set before starting the server. +System.setProperty("io.ktor.server.sessions.deferred", "true") // in code + +// or pass it via the JVM: +// java -Dio.ktor.server.sessions.deferred=true -jar myapp.jarThis small addition saves readers a round-trip to other docs and prevents subtle “property set too late” issues. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 262e4edaaaf432c592ae47f35dff17d34da468ca and e8d478b42aa1f9cac1083d1f841861bd39601539. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `topics/server-sessions.md` (1 hunks) </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
KTOR-8110