summaryrefslogtreecommitdiffstats
path: root/tools/maven/gerrit-acceptance-framework_pom.xml
diff options
context:
space:
mode:
authorLuca Milanesio <luca.milanesio@gmail.com>2021-01-18 21:45:47 +0100
committerLuca Milanesio <luca.milanesio@gmail.com>2021-01-26 07:43:24 +0000
commite154d31933b65d130c8d484f5ce0445d623029d3 (patch)
tree06120f9f2454a4127e74622383758d346007eb5c /tools/maven/gerrit-acceptance-framework_pom.xml
parentb4510674f943e4dfd4a6aa47d9ae795749fa4892 (diff)
Avoid creating HTTP Sessions for Git-over-HTTP
The Change-Id: Iffcd0fbd7 has involuntarily triggered the creation of a new HTTP Session for every invocation a Git-over-HTTP request. All came from the mistake of tracing the HTTP session instead of the Gerrit session in the audit record. The HTTP Servlet API specs say that any attempt to access the current session of an incoming request would result in the creation of a brand-new session. The session involuntarily created also had an expiry time equal to zero, which prevented the session housekeeper to reclaim them later on, even though they were unused. The consequence of creating an empty session for every Git-over-HTTP request isn't immediately tangible, because the session is empty and doesn't occupy a significant amount of memory. However, longer-term, the in-memory hashtable that records all the sessions, each one using 750 bytes on average, will be causing the overload of the JVM heap and the crash of the process because of lack of available memory. Use the correct Gerrit session-id, retrieving from the Provider<WebSession> the proper session, if active and logged in, and make sure in tests that no HTTP sessions are created as a result of a Git-over-http request. Bug: Issue 13858 Change-Id: I8c086fed54b196c3f46fa88ac78c127784524d30
Diffstat (limited to 'tools/maven/gerrit-acceptance-framework_pom.xml')
0 files changed, 0 insertions, 0 deletions