<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>149609</bug_id>
          
          <creation_ts>2015-09-28 17:02:41 -0700</creation_ts>
          <short_desc>Appscale query fails because of missing index</short_desc>
          <delta_ts>2017-03-15 17:15:28 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aakash Jain">aakash_jain</reporter>
          <assigned_to name="Aakash Jain">aakash_jain</assigned_to>
          <cc>ap</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>lforschler</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1129115</commentid>
    <comment_count>0</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2015-09-28 17:02:41 -0700</bug_when>
    <thetext>AppScale logs have the following below stacktrace. We add to add the index accordingly. 

 33369   File &quot;/var/apps/webkit-queues/app/handlers/queuestatus.py&quot;, line 65, in _fetch_statuses
 33370     return statuses.order(&quot;-date&quot;).fetch(15)
 33371   File &quot;/root/appscale/AppServer/google/appengine/ext/db/__init__.py&quot;, line 2157, in fetch
 33372     return list(self.run(limit=limit, offset=offset, **kwargs))
 33373   File &quot;/root/appscale/AppServer/google/appengine/ext/db/__init__.py&quot;, line 2326, in next
 33374     return self.__model_class.from_entity(self.__iterator.next())
 33375   File &quot;/root/appscale/AppServer/google/appengine/datastore/datastore_query.py&quot;, line 2892, in next
 33376     next_batch = self.__batcher.next()
 33377   File &quot;/root/appscale/AppServer/google/appengine/datastore/datastore_query.py&quot;, line 2754, in next
 33378     return self.next_batch(self.AT_LEAST_ONE)
 33379   File &quot;/root/appscale/AppServer/google/appengine/datastore/datastore_query.py&quot;, line 2791, in next_batch
 33380     batch = self.__next_batch.get_result()
 33381   File &quot;/root/appscale/AppServer/google/appengine/api/apiproxy_stub_map.py&quot;, line 615, in get_result
 33382     return self.__get_result_hook(self)
 33383   File &quot;/root/appscale/AppServer/google/appengine/datastore/datastore_query.py&quot;, line 2543, in __query_result_hook
 33384     yaml_index=yaml, xml_index=xml)
 33385 NeedIndexError: Query requires an index
 33386 The suggested index for this query is:
 33387 - kind: QueueStatus
 33388   properties:
 33389   - name: bot_id
 33390   - name: queue_name
 33391   - name: date
 33392     direction: desc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129116</commentid>
    <comment_count>1</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2015-09-28 17:04:34 -0700</bug_when>
    <thetext>It is a regression from https://bugs.webkit.org/show_bug.cgi?id=149194</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129122</commentid>
    <comment_count>2</comment_count>
      <attachid>262031</attachid>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2015-09-28 17:09:47 -0700</bug_when>
    <thetext>Created attachment 262031
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129133</commentid>
    <comment_count>3</comment_count>
      <attachid>262031</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-09-28 18:09:14 -0700</bug_when>
    <thetext>Comment on attachment 262031
proposed patch

Clearing flags on attachment: 262031

Committed r190300: &lt;http://trac.webkit.org/changeset/190300&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129134</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-09-28 18:09:19 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>262031</attachid>
            <date>2015-09-28 17:09:47 -0700</date>
            <delta_ts>2015-09-28 18:09:14 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>patch-index1</filename>
            <type>text/plain</type>
            <size>1029</size>
            <attacher name="Aakash Jain">aakash_jain</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDE5MDI5NykKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDEyIEBACisyMDE1LTA5LTI4ICBBYWthc2ggSmFpbiAgPGFha2FzaF9qYWluQGFwcGxlLmNv
bT4KKworICAgICAgICBBcHBzY2FsZSBxdWVyeSBmYWlscyBiZWNhdXNlIG9mIG1pc3NpbmcgaW5k
ZXgKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE0OTYw
OQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgICogUXVl
dWVTdGF0dXNTZXJ2ZXIvaW5kZXgueWFtbDogQWRkZWQgdGhlIHJlcXVpcmVkIGluZGV4LgorCiAy
MDE1LTA5LTI4ICBCcmVudCBGdWxnaGFtICA8YmZ1bGdoYW1AYXBwbGUuY29tPgogCiAgICAgICAg
IFtXaW5dIEFsbG93IFdpbmRvd3MgdG8gcnVuIHRlc3Qtd2Via2l0cHkgd2l0aG91dCBDeWd3aW4K
SW5kZXg6IFRvb2xzL1F1ZXVlU3RhdHVzU2VydmVyL2luZGV4LnlhbWwKPT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0g
VG9vbHMvUXVldWVTdGF0dXNTZXJ2ZXIvaW5kZXgueWFtbAkocmV2aXNpb24gMTkwMjg4KQorKysg
VG9vbHMvUXVldWVTdGF0dXNTZXJ2ZXIvaW5kZXgueWFtbAkod29ya2luZyBjb3B5KQpAQCAtNTYs
NiArNTYsMTMgQEAgaW5kZXhlczoKIAogLSBraW5kOiBRdWV1ZVN0YXR1cwogICBwcm9wZXJ0aWVz
OgorICAtIG5hbWU6IGJvdF9pZAorICAtIG5hbWU6IHF1ZXVlX25hbWUKKyAgLSBuYW1lOiBkYXRl
CisgICAgZGlyZWN0aW9uOiBkZXNjCisKKy0ga2luZDogUXVldWVTdGF0dXMKKyAgcHJvcGVydGll
czoKICAgLSBuYW1lOiBtZXNzYWdlCiAgIC0gbmFtZTogcXVldWVfbmFtZQogICAtIG5hbWU6IGRh
dGUK
</data>

          </attachment>
      

    </bug>

</bugzilla>