Monorail Project: gerrit Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 4630 Navigating up from diff while "Working" causes OrmDuplicateKeyException
Starred by 3 users Reported by org...@gmail.com, Sep 25 2016 Back to list
Status: Submitted
Owner: ----
Closed: Sep 2016



Sign in to add a comment
Affected Version: 2.13

What steps will reproduce the problem?
1. You need a slow server (I can't reproduce on gerrit-review)
2. Use the keyboard to open a file diff
3. While the Working label is still displayed, navigate up (u on the keyboard)

What is the expected output?
It should work

What do you see instead?
500 Server Error:
[2016-09-25 08:33:30,376] [HTTP-137] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in GET /review/changes/17875/revisions/83c6154deaeb8b16650fa6977b608e25ed126e0c/files?reviewed
com.google.gwtorm.server.OrmDuplicateKeyException: ACCOUNT_PATCH_REVIEWS
	at com.google.gerrit.server.schema.H2AccountPatchReviewStore.convertError(H2AccountPatchReviewStore.java:241)
	at com.google.gerrit.server.schema.H2AccountPatchReviewStore.markReviewed(H2AccountPatchReviewStore.java:179)
	at com.google.gerrit.server.change.Files$ListFiles.copy(Files.java:316)
	at com.google.gerrit.server.change.Files$ListFiles.reviewed(Files.java:240)
	at com.google.gerrit.server.change.Files$ListFiles.apply(Files.java:146)
	at com.google.gerrit.server.change.Files$ListFiles.apply(Files.java:92)
	at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
	at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
	at com.google.gerrit.httpd.GetUserFilter.doFilter(GetUserFilter.java:82)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.RequireSslFilter.doFilter(RequireSslFilter.java:77)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:73)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:122)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.RequestMetricsFilter.doFilter(RequestMetricsFilter.java:60)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
	at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:138)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "PRIMARY_KEY_1 ON PUBLIC.ACCOUNT_PATCH_REVIEWS(ACCOUNT_ID, CHANGE_ID, PATCH_SET_ID, FILE_NAME) VALUES ( /* key:27 */ 1000001, 17875, 7, 'Modules/GWApp/Pkgs/Streaming/ParticipantEndPoint.h')"; SQL statement:
INSERT INTO ACCOUNT_PATCH_REVIEWS (ACCOUNT_ID, CHANGE_ID, PATCH_SET_ID, FILE_NAME) VALUES (?, ?, ?, ?) [23505-176]
	at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1199)
	at com.google.gerrit.server.schema.H2AccountPatchReviewStore.markReviewed(H2AccountPatchReviewStore.java:177)
	... 44 more


Please provide any additional information below.
Never happened to me with 2.12. Looks like a regression.
 
Project Member Comment 1 by huga...@gmail.com, Sep 26 2016
Status: ChangeUnderReview
https://gerrit-review.googlesource.com/#/c/87090/
Labels: FixedIn-2.13.2
Status: Submitted
Sign in to add a comment