Skip to main content

Update Session Table Tool

When configured kylin.web.session.secure-random-create-enabled=true or kylin.web.session.jdbc-encode-enabled=true, the session table needs to be upgraded, otherwise the user cannot log in.

How to Use

  • Use tools to update

      $KYLIN_HOME/bin/kylin.sh org.apache.kylin.tool.upgrade.UpdateSessionTableCLI

Note: During the upgrade process, the update may fail due to permission reasons. At this time, the operation and maintenance personnel need to manually execute the statement to update the session table.

Sql

Use PostgreSQL as Metastore

ALTER TABLE spring_session ALTER COLUMN SESSION_ID TYPE VARCHAR(180) , ALTER COLUMN SESSION_ID SET NOT NULL;

ALTER TABLE spring_session_ATTRIBUTES ALTER COLUMN SESSION_ID TYPE VARCHAR(180) , ALTER COLUMN SESSION_ID SET NOT NULL;

Use MySQL as Metastore

ALTER TABLE spring_session MODIFY COLUMN SESSION_ID VARCHAR(180) NOT NULL;

ALTER TABLE spring_session_ATTRIBUTES MODIFY COLUMN SESSION_ID VARCHAR(180) NOT NULL;