Git Product home page Git Product logo

Comments (21)

quinthar avatar quinthar commented on September 15, 2024 2

I can't remember why I wrote that. I can't think of a good explanation for that, so lacking a reason I suggest we ignore that comment.

from bedrock.

quinthar avatar quinthar commented on September 15, 2024

@danielk1977 - As the resident query plan master, can you comment on whether you think the above query plan would be significantly slower than the original? Thanks!

from bedrock.

danielk1977 avatar danielk1977 commented on September 15, 2024

They're quite similar. The first scans a subset of the index jobsStateNextRunName and does a by-rowid lookup on the main table for each index row scanned. It then tests the GLOB condition, and if it matches inserts the row into the temporary b-tree. Once it has accumulated all matching rows in the temp b-tree, it reads them out in sorted order to return to the user.

The second query is similar, except that it scans two regions of the index to collect rows.

I think the relative speed of these two queries will be roughly proportional to the number of rows returned. i.e. if the second returns twice as many rows as the first it will likely run in roughly twice the time.

Dan.

from bedrock.

quinthar avatar quinthar commented on September 15, 2024

from bedrock.

quinthar avatar quinthar commented on September 15, 2024

Actually, strike that -- it's actually super fast, it looks like a flaw in our monitoring system was mis-attributing a slowdown to Bedrock.

from bedrock.

fnwbr avatar fnwbr commented on September 15, 2024

So what's the status with this?
The PR was reverted with #194 - correct?

from bedrock.

fnwbr avatar fnwbr commented on September 15, 2024

Bump, any news on this?
If the code itself was fine and we only had to revert because of the schema changes taking too long when done via upgradeDatabase can we please look into manually running the schema changes first?

from bedrock.

tylerkaraszewski avatar tylerkaraszewski commented on September 15, 2024

We split the change into a schema change and a code change so that we could test them individually, and we're waiting for the schema change to be deployed. The fires this week have kept #infra pretty busy so it's been a bit delayed. When the schema change goes out, we'll see if that causes a problem, indicating a code problem, or if the schema change causes a problem itself.

from bedrock.

tylerkaraszewski avatar tylerkaraszewski commented on September 15, 2024

@coleaeason - we're still waiting on the schema change to be deployed, correct?

from bedrock.

flodnv avatar flodnv commented on September 15, 2024

I can help with the deploys, I'm down to deploy bedrock this week.

from bedrock.

coleaeason avatar coleaeason commented on September 15, 2024

Sorry, yeah i've had no time for this and it's pretty low priority for me compared to other things on my plate. If someone else ( @flodnv or @iwiznia ) wants to take ownership of deploying this since they are more invested in getting it out, then I'm fine with that.

from bedrock.

fnwbr avatar fnwbr commented on September 15, 2024

Bumping this again; I know you are having lots of other priorities, this would definitely help us on the Chatbot front though.

from bedrock.

flodnv avatar flodnv commented on September 15, 2024

@tylerkaraszewski where's the PR for this? Is is this #235 ? Then bump @cead22 @mea36

from bedrock.

cead22 avatar cead22 commented on September 15, 2024

@flodnv yes.

@fnwbr @mea36 feel free to take over recreating the PR. It's filled with conflicts that since the PRs CancelJob and CreateJobs got merged.

Please make sure to run the tests in #235 #191 and #195 when submitting the PR
cc @pecanoro

from bedrock.

mea36 avatar mea36 commented on September 15, 2024

Thanks for the update @cead22
Why aren't those tests automated?

from bedrock.

cead22 avatar cead22 commented on September 15, 2024

We hadn't started writing tests at the time and I didn't know how to setup the environment to run them. I asked @flodnv to get that started and now we have tests in place.

As a reminder, I wrote the original PR in May

from bedrock.

fnwbr avatar fnwbr commented on September 15, 2024

Re-created the original PR (linked above) to get this kickstarted; any reason that @tylerkaraszewski's un-revert did not have the schema changes coming with the PR anymore?

I also left them out of my PR for now; also didn't test anything yet

from bedrock.

cead22 avatar cead22 commented on September 15, 2024

The original PR included 2 changes: retryAfter and the schema change and when we deployed them we saw issues (commands being queued but not dequeued and processed) and we decided to split the two changes and deploy them separately.

The schema change is already deployed and now we want to deploy retryAfter to see if it causes issues

carlos@www1:~$ sudo readdb.sh ".schema jobs"
CREATE TABLE jobs ( created TIMESTAMP NOT NULL, jobID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, state TEXT NOT NULL, name TEXT NOT NULL, nextRun TIMESTAMP NOT NULL, lastRun TIMESTAMP, repeat TEXT NOT NULL, data TEXT NOT NULL , priority INTEGER NOT NULL DEFAULT 500, parentJobID INTEGER NOT NULL DEFAULT 0 , retryAfter TEXT NOT NULL DEFAULT "");

from bedrock.

fnwbr avatar fnwbr commented on September 15, 2024

Ah, I didn't see that retryAfter is still in the schema for when creating a completely new jobs table / I didn't notice that it wasn't removed from there; so we're good 👍

from bedrock.

mea36 avatar mea36 commented on September 15, 2024

Can someone clarify this point

To be safe, update UpdateJob to return 402 Auto-retrying jobs cannot be updated once running if state='RUNQUEUED'. If a job is to be automatically retried, we can't have it modifying itself prior to the retry.

Why can we update the data for a RUNNING job but not a RUNQUEUED job?

cc @pecanoro

from bedrock.

iwiznia avatar iwiznia commented on September 15, 2024

Reopening as this had a performance regression and had to be rolled back.

from bedrock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.