Knowledge Drop

Workload Management (WLM) does not work with PDTs


Userlevel 2
  • Looker Staff
  • 25 replies

Last tested: Mar 12, 2021
 

WLM is a Redshift tool that assigns different queries to different queues to distribute load.

Looker does not support using WLM with PDTs.

We can also see this with those using Aptible database tunnels.

Why?

WLM cancels build statements when they’re moved from one queue to another, which means PDTs essentially get killed and restarted on the DB, but Looker thinks they’re killed so it starts another one. Chaos ensues.

Specifically, here is what can happen:

  1. Looker starts a PDT.
  2. WLM kills PDT.
  3. WLM restarts PDT.
  4. Looker starts a second PDT that is actually the same.
  5. WLM PDT finishes.
  6. Looker PDT finishes and errors out because WLM PDT already exists.
  7. Looker thinks the PDT build failed and returns you an error in the UI.

Why do queries switch queues?

Most Redshift clusters have WLM enabled with 1 queue. When there is more than 1 queue, queries that come in to the database are assigned to their appropriate queue. When the query gets assigned to the appropriate queue, it is given a new pid and the previous pid appears as cancelled.

 

This content is subject to limited support.                

 


0 replies

Be the first to reply!

Reply