My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 6: Closed changes are reporting as open from ChangeAccess.byOwnerOpen
  Back to list
Status:  Released
Owner:  ----
Closed:  May 2012


Sign in to add a comment
 
Reported by code-rev...@gtempaccount.com, Sep 24, 2009
Reported by Shawn Pearce <sop@google.com> on Mon Jan 12 19:07:03 PST 2009
Source: JIRA GERRIT-6
Affected Version: 2.0
Environment: PostgreSQL 8.3.5

Merged changes are showing up under the open list.  PostgreSQL
gerrit2.source.android.com is treating 'a' and 'A' as the same character for
some reason.  This bug is showing up in 8.3.5.

Under 7.4.12 (my debug environment) I don't see the problem.
Sep 24, 2009
#1 code-rev...@gtempaccount.com
Comment by Shawn Pearce <sop@google.com> on Mon Jan 12 22:59:09 PST 2009

The PostgreSQL cluster was misinstalled.

# select name,setting from pg_settings where name like 'lc_%';
    name     |   setting
-------------+-------------
 lc_collate  | en_US.UTF-8
 lc_ctype    | en_US.UTF-8
 lc_messages | en_US.UTF-8
 lc_monetary | en_US.UTF-8
 lc_numeric  | en_US.UTF-8
 lc_time     | en_US.UTF-8
(6 rows)

According to the PostgreSQL documentation lc_collate should be set to C to
ensure 'a' != 'A'.  My debug server has:

# select name,setting from pg_settings where name like 'lc_%';
    name     | setting
-------------+---------
 lc_collate  | C
 lc_ctype    | en_US
 lc_messages | en_US
 lc_monetary | C
 lc_numeric  | C
 lc_time     | C
(6 rows)

so I think we need to rebuild the production cluster to use lc_collate = C.
Sep 24, 2009
#2 code-rev...@gtempaccount.com
Update by Shawn Pearce <sop@google.com> on Mon Jan 12 23:22:29 PST 2009

Fixed in version 2.0.
Sep 24, 2009
#3 code-rev...@gtempaccount.com
Comment by Shawn Pearce <sop@google.com> on Tue Jan 13 09:00:18 PST 2009

I've decided Gerrit's use of a range scan on status for the query "WHERE
status >= 'a' AND status <= 'z'" is too error prone to rely upon.  PostgreSQL
on some systems installs with lc_collate = C and on others lc_collate =
en_US.UTF-8.

Instead we should split the open/closed status away from the change status
itself.
Sep 24, 2009
#4 code-rev...@gtempaccount.com
Update by Shawn Pearce <sop@google.com> on Tue Jan 13 09:00:36 PST 2009
Status: Fixed
Sep 25, 2009
#5 code-rev...@gtempaccount.com
(No comment was entered for this change.)
Labels: FixedIn-2.0
May 15, 2012
#6 sop@google.com
(No comment was entered for this change.)
Status: Released
Owner: ---
Sign in to add a comment

Powered by Google Project Hosting