Remove ListChangesOption.DRAFT_COMMENTS
If this option is used the change details include for each patch set the information whether there are draft comments on it. The problem is that the draft comment status is not included into the ETag computation of the change and as result the change is not reloaded when the draft comment status has changed. Including the draft comment status into the ETag computation would be expensive since this requires one SQL statement per patch set to load the draft comments from the database. An easier and cheaper way to find out if there are draft comments on a change is to do a change query with the 'has:draft' operator. This query can be directly answered from the secondary index and no SQL statements need to be fired. Already now ListChangesOption.DRAFT_COMMENTS is no longer used by the Gerrit client. Also the name of the DRAFT_COMMENTS option was misleading. It didn't include the draft comments into change detail, but only for each patch set the information whether it has draft comments. Change-Id: I297fcf01256f02953aa0b5caee4f3aee4554bc59 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -307,7 +307,6 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
public final native int _number() /*-{ return this._number; }-*/;
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native boolean draft() /*-{ return this.draft || false; }-*/;
|
||||
public final native boolean hasDraftComments() /*-{ return this.has_draft_comments || false; }-*/;
|
||||
public final native boolean isEdit() /*-{ return this._number == 0; }-*/;
|
||||
public final native CommitInfo commit() /*-{ return this.commit; }-*/;
|
||||
public final native void setCommit(CommitInfo c) /*-{ this.commit = c; }-*/;
|
||||
|
||||
Reference in New Issue
Block a user