[ 
https://issues.apache.org/jira/browse/CASSSIDECAR-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18123343#comment-18123343
 ] 

Arvind Kandpal commented on CASSSIDECAR-502:
--------------------------------------------

[~frankgh]  Thanks for the pointer. I checked CASSSIDECAR-331, and it looks 
like it covers a different case.

CASSSIDECAR-331 adds schema checks in the auth path (validatePrerequisites, 
called in AuthModule), so it only applies when access_control is enabled. This 
issue happens with the default config (access_control.enabled: false, 
sidecar.schema.is_enabled: false), where that code never runs.

Could you help me understand how 331 fixes this endpoint? I may be missing 
something.

> Connected client stats endpoint returns 500 when sidecar schema is disabled
> ---------------------------------------------------------------------------
>
>                 Key: CASSSIDECAR-502
>                 URL: https://issues.apache.org/jira/browse/CASSSIDECAR-502
>             Project: Sidecar for Apache Cassandra
>          Issue Type: Bug
>          Components: Rest API
>            Reporter: Arvind Kandpal
>            Assignee: Arvind Kandpal
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> GET /api/v1/cassandra/stats/connected-clients returns 500 when 
> sidecar.schema.is_enabled is false, which is the default:
> {"status":"Internal Server Error","code":500,"message":"Unexpected error 
> encountered in handler"}
> Steps to reproduce:
> 1. Start Sidecar (trunk) with the default sidecar.yaml, against Cassandra 4.1.
> 2. curl [http://localhost:9043/api/v1/cassandra/stats/connected-clients]
> Expected: a clear error that says the sidecar schema is required.
> Actual: 500 with a generic message.
> Root cause: when sidecar.schema.is_enabled is false, the table schema is null 
> and ConnectedClientStatsDatabaseAccessor fails with a NullPointerException, 
> which surfaces as a generic 500.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to