"CREATE INDEX" jobs show as pending, "SHOW INDEXES" says they exist


We are seeing an issue where jobs that are creating indexes (CREATE INDEX ON...) are being shown in the Pending state by both the web interface and SHOW JOBS query. Some of these were created many days ago. At the same time, SHOW INDEXES queries indicate that the indexes exist. The associated tables are not large: a few MB at most currently.

We are running v2.1.4 on a dedicated cluster (not virtualized).

This doesn’t seem to be causing any issues, but I wanted to check that it was either known about or expected.

Thank you for your help,


Hey @JohnnyLee,

If this is still happening, it’s not expected - it sounds like the show jobs query has an entry that wasn’t updated.

Do you see the same problem on 2.1.5 now that it’s out?

If so, it’d be helpful to get steps to try and reproduce the issue and logs from the impacted cluster.

Thanks, and sorry for the delay.

I have a similar issue. I issued a create index… and then canceled it. I then ran create index ... (with different arguments) and its stuck in pending (duration is > 30min now).

When I run SHOW INDEXES FROM mytable I do not see the index. I am using CockroachDB 2.1.5 (3 node cluster in docker).

A few minutes after posting the comment above, I now see a ROLL BACK JOB... entry in the Jobs UI…which has been running for 7 minutes so far. I’m guessing its blocking my newer create index…would be nice to have a little more insight.

The “ROLL BACK…” completed, and now the create index ... is running.

@codecraig good to know - sounds like the ROLLBACK is what blocked the new index creation. It’d be good to know if that’s what happened in @JohnnyLee’s case as well.

Is there still an issue from your perspective or does everything make sense?

We’re still seeing some CREATE INDEX jobs with a pending status, while others show succeeded. We don’t see any adverse effects.

We don’t have any other pending jobs.