Skip to main content

LAG() can cause a node crash?

  • July 4, 2016
  • 1 reply
  • 11 views

StephanW

Recently I struggled with sudden node crahses. I found out that a certain parametrization of the LAG() function was the cause. Luckily, I could restart the node with AdminTools.

I was able to reproduce the crash by using the table and sample data of chapter "Sessionization" in the docs.

It turned out that using an offset parameter other than a fixed integer produces the node crash. E.g. in the following query:

LAG(timestamp,userId) crashes.

LAG(timestamp,1) doesn't crash (also value 50 wouldn't crash).

 

SELECT userId

  ,timestamp

  ,CONDITIONAL_TRUE_EVENT(timestamp - LAG(timestamp,userId) > '30 seconds')
    OVER(PARTITION BY userId ORDER BY timestamp) AS session

FROM WebClicks;

 

Is this "simply a bug" and will it eventually be fixed, or can I not use Integer valued expressions as a parameter (however, this should be possible from the docs)?

1 reply

StephanW
  • Author
  • New Participant
  • July 4, 2016

Addition: Just the node I connected my SQL editor to crashed (process "vertica"). The other nodes in the cluster were not affected.