Loading ...
Sorry, an error occurred while loading the content.

Re: Vote API disabled for the moment

Expand Messages
  • mcafeeryan92
    Hi, What s going on with the vote_voter functionality? Is there some equivalent available in v2, or is v1 s functionality going to work soon or is it changed?
    Message 1 of 10 , Feb 23, 2013
    • 0 Attachment
      Hi,

      What's going on with the vote_voter functionality? Is there some equivalent available in v2, or is v1's functionality going to work soon or is it changed? Thanks so much!

      -Ryan

      --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@...> wrote:
      >
      > Someone's queries to the votes API were bringing down my whole server,
      > so I've disabled the two votes endpoints for the moment.
      >
      > MySQL wasn't optimizing a query very well, to say the least.
      >
      > --
      > - Josh Tauberer (@JoshData)
      >
      > http://razor.occams.info
      >
    • Josh Tauberer
      Ok it s enabled now. The option filter doesn t work the same. You can pass the ID of an option object, which you can get from the vote API. I ll try to add
      Message 2 of 10 , Feb 24, 2013
      • 0 Attachment
        Ok it's enabled now.

        The 'option' filter doesn't work the same. You can pass the ID of an
        option object, which you can get from the vote API.

        I'll try to add documentation this week.

        - Josh Tauberer (@JoshData)

        http://razor.occams.info

        On 02/24/2013 11:48 AM, Maurizio wrote:
        > Hello Josh,
        >
        > first, thank you for your awesome work.
        > I wanted to ask if you'll enable vote_voter for v2 as well :)
        >
        > Cheers,
        > Maurizio
        >
        > --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@...> wrote:
        >> Hey, Kent.
        >>
        >> On the up-side, it wasn't you. The culprit was paying attention and sent
        >> an email soon after the API started returning 404s. :)
        >>
        >> I'm afraid to turn the v1 API back on because the framework I used for
        >> it (Tastypie in Django) doesn't give me much control over the queries.
        >>
        >> You can switch to the v2 API which works mostly the same. Just
        >> substitute v2 for v1, and check the field names still line up. In the v2
        >> API, I've blocked the sort of query that was the problem.
        >>
        >> Basically, when you have an OFFSET that's too large MySQL decides it
        >> doesn't need to worry about query optimization anymore, and it executes
        >> the query without the use of the key that it uses normally. The problem
        >> was triggered by any offset >= 157191. Unfortunately since the SQL
        >> itself is still generated by Django, I can't do any further optimization
        >> (like adding FORCE INDEX, which does work).
        >>
        >> I've made it so the v2 API won't let you set a high offset, so at least
        >> this problem is avoided.
        >>
        >> The v2 API also has better error checking. In fact, when there's an
        >> error it reports the error to the caller rather than sending an email to
        >> me. (Improvement!) It is also more cautious about what to allow to
        >> prevent other runaway queries, so some previously possible queries with
        >> complex filters or unusual ordering may by rejected by v2.
        >>
        >> This issue only affects the two votes-related APIs because those were
        >> the only APIs that were backed by MySQL. Bills and people APIs are
        >> backed by Solr (and so probably have different undiscovered issues).
        >>
        >> Feedback on v2 welcome, etc.
        >>
        >> - Josh Tauberer (@JoshData)
        >>
        >> http://razor.occams.info
        >>
        >> On 02/21/2013 03:26 PM, maplight_kent wrote:
        >>>
        >>> Can we do anything to help get it back online? We have some MySQL folks who might be able to optimize the culprit queries.
        >>>
        >>> If it was our calls, I'll double-check that we're not pulling more data than necessary.
        >>>
        >>> Kent
        >>>
        >>> --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@> wrote:
        >>>> Someone's queries to the votes API were bringing down my whole server,
        >>>> so I've disabled the two votes endpoints for the moment.
        >>>>
        >>>> MySQL wasn't optimizing a query very well, to say the least.
        >>>>
        >>>> --
        >>>> - Josh Tauberer (@JoshData)
        >>>>
        >>>> http://razor.occams.info
        >>>>
        >>>
        >>>
        >>> ------------------------------------
        >>>
        >>> Yahoo! Groups Links
        >>>
        >>>
        >>>
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
      • Maurizio
        Thanks Josh, I can see it now. You rock. Maurizio
        Message 3 of 10 , Feb 24, 2013
        • 0 Attachment
          Thanks Josh, I can see it now. You rock.

          Maurizio

          --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@...> wrote:
          >
          > Ok it's enabled now.
          >
          > The 'option' filter doesn't work the same. You can pass the ID of an
          > option object, which you can get from the vote API.
          >
          > I'll try to add documentation this week.
          >
          > - Josh Tauberer (@JoshData)
          >
          > http://razor.occams.info
          >
          > On 02/24/2013 11:48 AM, Maurizio wrote:
          > > Hello Josh,
          > >
          > > first, thank you for your awesome work.
          > > I wanted to ask if you'll enable vote_voter for v2 as well :)
          > >
          > > Cheers,
          > > Maurizio
          > >
          > > --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@> wrote:
          > >> Hey, Kent.
          > >>
          > >> On the up-side, it wasn't you. The culprit was paying attention and sent
          > >> an email soon after the API started returning 404s. :)
          > >>
          > >> I'm afraid to turn the v1 API back on because the framework I used for
          > >> it (Tastypie in Django) doesn't give me much control over the queries.
          > >>
          > >> You can switch to the v2 API which works mostly the same. Just
          > >> substitute v2 for v1, and check the field names still line up. In the v2
          > >> API, I've blocked the sort of query that was the problem.
          > >>
          > >> Basically, when you have an OFFSET that's too large MySQL decides it
          > >> doesn't need to worry about query optimization anymore, and it executes
          > >> the query without the use of the key that it uses normally. The problem
          > >> was triggered by any offset >= 157191. Unfortunately since the SQL
          > >> itself is still generated by Django, I can't do any further optimization
          > >> (like adding FORCE INDEX, which does work).
          > >>
          > >> I've made it so the v2 API won't let you set a high offset, so at least
          > >> this problem is avoided.
          > >>
          > >> The v2 API also has better error checking. In fact, when there's an
          > >> error it reports the error to the caller rather than sending an email to
          > >> me. (Improvement!) It is also more cautious about what to allow to
          > >> prevent other runaway queries, so some previously possible queries with
          > >> complex filters or unusual ordering may by rejected by v2.
          > >>
          > >> This issue only affects the two votes-related APIs because those were
          > >> the only APIs that were backed by MySQL. Bills and people APIs are
          > >> backed by Solr (and so probably have different undiscovered issues).
          > >>
          > >> Feedback on v2 welcome, etc.
          > >>
          > >> - Josh Tauberer (@JoshData)
          > >>
          > >> http://razor.occams.info
          > >>
          > >> On 02/21/2013 03:26 PM, maplight_kent wrote:
          > >>>
          > >>> Can we do anything to help get it back online? We have some MySQL folks who might be able to optimize the culprit queries.
          > >>>
          > >>> If it was our calls, I'll double-check that we're not pulling more data than necessary.
          > >>>
          > >>> Kent
          > >>>
          > >>> --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@> wrote:
          > >>>> Someone's queries to the votes API were bringing down my whole server,
          > >>>> so I've disabled the two votes endpoints for the moment.
          > >>>>
          > >>>> MySQL wasn't optimizing a query very well, to say the least.
          > >>>>
          > >>>> --
          > >>>> - Josh Tauberer (@JoshData)
          > >>>>
          > >>>> http://razor.occams.info
          > >>>>
          > >>>
          > >>>
          > >>> ------------------------------------
          > >>>
          > >>> Yahoo! Groups Links
          > >>>
          > >>>
          > >>>
          > >
          > >
          > >
          > > ------------------------------------
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          >
        • Josh Tauberer
          Documentation for the v2 API is up: http://www.govtrack.us/developers/api FYI, v2 also adds full text search for bills (and people). - Josh Tauberer
          Message 4 of 10 , Feb 27, 2013
          • 0 Attachment
            Documentation for the v2 API is up:

            http://www.govtrack.us/developers/api

            FYI, v2 also adds full text search for bills (and people).
            - Josh Tauberer (@JoshData)
            
            http://razor.occams.info
            On 02/24/2013 03:59 PM, Maurizio wrote:
            Thanks Josh, I can see it now. You rock.
            
            Maurizio
            
            --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@...> wrote:
            
            Ok it's enabled now.
            
            The 'option' filter doesn't work the same. You can pass the ID of an 
            option object, which you can get from the vote API.
            
            I'll try to add documentation this week.
            
            - Josh Tauberer (@JoshData)
            
            http://razor.occams.info
            
            On 02/24/2013 11:48 AM, Maurizio wrote:
            
            Hello Josh,
            
            first, thank you for your awesome work.
            I wanted to ask if you'll enable vote_voter for v2 as well :)
            
            Cheers,
            Maurizio
            
            --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@> wrote:
            
            Hey, Kent.
            
            On the up-side, it wasn't you. The culprit was paying attention and sent
            an email soon after the API started returning 404s. :)
            
            I'm afraid to turn the v1 API back on because the framework I used for
            it (Tastypie in Django) doesn't give me much control over the queries.
            
            You can switch to the v2 API which works mostly the same. Just
            substitute v2 for v1, and check the field names still line up. In the v2
            API, I've blocked the sort of query that was the problem.
            
            Basically, when you have an OFFSET that's too large MySQL decides it
            doesn't need to worry about query optimization anymore, and it executes
            the query without the use of the key that it uses normally. The problem
            was triggered by any offset >= 157191. Unfortunately since the SQL
            itself is still generated by Django, I can't do any further optimization
            (like adding FORCE INDEX, which does work).
            
            I've made it so the v2 API won't let you set a high offset, so at least
            this problem is avoided.
            
            The v2 API also has better error checking. In fact, when there's an
            error it reports the error to the caller rather than sending an email to
            me. (Improvement!) It is also more cautious about what to allow to
            prevent other runaway queries, so some previously possible queries with
            complex filters or unusual ordering may by rejected by v2.
            
            This issue only affects the two votes-related APIs because those were
            the only APIs that were backed by MySQL. Bills and people APIs are
            backed by Solr (and so probably have different undiscovered issues).
            
            Feedback on v2 welcome, etc.
            
            - Josh Tauberer (@JoshData)
            
            http://razor.occams.info
            
            On 02/21/2013 03:26 PM, maplight_kent wrote:
            
            Can we do anything to help get it back online?  We have some MySQL folks who might be able to optimize the culprit queries.
            
            If it was our calls, I'll double-check that we're not pulling more data than necessary.
            
            Kent
            
            --- In govtrack@yahoogroups.com, Josh Tauberer <tauberer@> wrote:
            
            Someone's queries to the votes API were bringing down my whole server,
            so I've disabled the two votes endpoints for the moment.
            
            MySQL wasn't optimizing a query very well, to say the least.
            
            -- 
            - Josh Tauberer (@JoshData)
            
            http://razor.occams.info
            
            
            
            ------------------------------------
            
            Yahoo! Groups Links
            
            
            
            
            
            
            ------------------------------------
            
            Yahoo! Groups Links
            
            
            
            
            
            
            
            ------------------------------------
            
            Yahoo! Groups Links
            
            <*> To visit your group on the web, go to:
                http://groups.yahoo.com/group/govtrack/
            
            <*> Your email settings:
                Individual Email | Traditional
            
            <*> To change settings online go to:
                http://groups.yahoo.com/group/govtrack/join
                (Yahoo! ID required)
            
            <*> To change settings via email:
                govtrack-digest@yahoogroups.com 
                govtrack-fullfeatured@yahoogroups.com
            
            <*> To unsubscribe from this group, send an email to:
                govtrack-unsubscribe@yahoogroups.com
            
            <*> Your use of Yahoo! Groups is subject to:
                http://docs.yahoo.com/info/terms/
            

          Your message has been successfully submitted and would be delivered to recipients shortly.