openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
17.02k stars 3.09k forks source link

cassandra: log in console when search enabled, but SASI disabled #3741

Closed codefromthecrypt closed 8 months ago

codefromthecrypt commented 8 months ago

Before, you couldn't see any error when a health check fails in cassandra for an unresolvable reason. Now you do, including the statement that failed.

This is important as we cannot enable SASI on a running cluster. It must be enabled in whatever starts cassandra.

Fixes https://github.com/openzipkin/zipkin/issues/3412

$ STORAGE_TYPE=cassandra3 java -jar ./zipkin-server/target/zipkin-server-*exec.jar

                  oo
                 oooo
                oooooo
               oooooooo
              oooooooooo
             oooooooooooo
           ooooooo  ooooooo
          oooooo     ooooooo
         oooooo       ooooooo
        oooooo   o  o   oooooo
       oooooo   oo  oo   oooooo
     ooooooo  oooo  oooo  ooooooo
    oooooo   ooooo  ooooo  ooooooo
   oooooo   oooooo  oooooo  ooooooo
  oooooooo      oo  oo      oooooooo
  ooooooooooooo oo  oo ooooooooooooo
      oooooooooooo  oooooooooooo
          oooooooo  oooooooo
              oooo  oooo

     ________ ____  _  _____ _   _
    |__  /_ _|  _ \| |/ /_ _| \ | |
      / / | || |_) | ' / | ||  \| |
     / /_ | ||  __/| . \ | || |\  |
    |____|___|_|   |_|\_\___|_| \_|

:: version 3.1.1-SNAPSHOT :: commit 47e1668 ::

2024-03-07T08:02:22.739+08:00  INFO [/] 83635 --- [oss-http-*:9411] c.l.a.s.Server                           : Serving HTTP at /[0:0:0:0:0:0:0:0%0]:9411 - http://127.0.0.1:9411/
2024-03-07T08:02:40.128+08:00  INFO [/] 83635 --- [cking-tasks-2-1] z.s.c.Schema                             : Detected Cassandra version 4.1.4
2024-03-07T08:02:40.128+08:00  INFO [/] 83635 --- [cking-tasks-2-1] z.s.c.Schema                             : Installing schema /zipkin2-schema.cql for keyspace zipkin2
2024-03-07T08:02:46.044+08:00  INFO [/] 83635 --- [cking-tasks-2-1] z.s.c.Schema                             : Installing indexes /zipkin2-schema-indexes.cql for keyspace zipkin2
2024-03-07T08:02:47.184+08:00 ERROR [/] 83635 --- [cking-tasks-2-1] z.s.c.Schema                             : Failed to execute [CREATE CUSTOM INDEX IF NOT EXISTS ON zipkin2.span (l_service) USING 'org.apache.cassandra.index.sasi.SASIIndex'
   WITH OPTIONS = {'mode': 'PREFIX'}]: SASI indexes are disabled. Enable in cassandra.yaml to use.