Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace internal (non-user-triggerable) ErrorCode with ErrorCode.SERVER_INTERNAL_ERROR #1238

Closed
tatu-at-datastax opened this issue Jul 3, 2024 · 0 comments · Fixed by #1239
Assignees

Comments

@tatu-at-datastax
Copy link
Contributor

tatu-at-datastax commented Jul 3, 2024

There are a few internal assertion-style failures with dedicated ErrorCodes: for example, SHRED_INTERNAL_NO_PATH. These should never occur; and if they do there are No User Serviceable Parts Inside -- no point exposing specific types externally. Instead we should use newly added ErrorCode.SERVER_INTERNAL_ERROR with suitable suffix we can use for debugging should ones actually occur.

List of such codes includes:

  • FILTER_UNRESOLVABLE
  • INVALID_LOGIC_OPERATOR
  • SHRED_INTERNAL_NO_PATH
  • SHRED_UNRECOGNIZED_NODE_TYPE
  • UNSUPPORTED_CQL_QUERY_TYPE
  • UNSUPPORTED_OPERATION
@tatu-at-datastax tatu-at-datastax self-assigned this Jul 3, 2024
tatu-at-datastax added a commit that referenced this issue Jul 3, 2024
amorton added a commit that referenced this issue Jul 16, 2024
Refactoring for tables, this adds the first read code for
reading from a table and makes the schema cache handle Table objects.

Using the janky FeatureFlags class.

Builds and unit tests pass with the -Poffline profile.

This is a squash of multiple commits from the ajm/tables branch, cherry picked
into the ajm/tables-chunk-2 branch which is build on the ajm/tables-chunk-1
branch.

The commits squashed here were:

commit 045fe36
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 15:42:00 2024 -0700

    Fix other 3 offline test failures too

commit 791f2b2
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 15:39:11 2024 -0700

    Fix 2 offline unit tests

commit 284c6a8
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 15:30:31 2024 -0700

    mvn fmt:format

commit e50947d
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Tue Jul 9 10:18:58 2024 +1200

    Refactor to run with the offline profile

    and fixed all failing non integration tests

-> Merge commit, not cherry picked <-
commit ca476da
Merge: a2dcaf2 138b372
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 14:06:15 2024 -0700

    Merge branch 'main' into ajm/tables

-> came from merge above, not cherry picked <-
commit 138b372
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 13:29:16 2024 -0700

    Add second link to Azure OpenAI docs

-> Merge commit, not cherry picked <-
commit a2dcaf2
Merge: 5350744 96b2839
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 12:18:00 2024 -0700

    Merge branch 'main' into ajm/tables

commit 5350744
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 12:14:11 2024 -0700

    fmt:format for offline classes too

-> came from merge above, not cheery picked  <-
commit 96b2839
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 11:31:52 2024 -0700

    Fixes #1238: convert internal-only `ErrorCode`s into `ErrorCode.SERVER_INTERNAL_ERROR` (#1239)

commit 8f0ea75
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Mon Jul 8 18:59:29 2024 +1200

    Working to accept a command targeted at a table !

    Will failed in the CommandResolver because
    resolveTableCommand is not implemented in subclasses.

commit 607f0d8
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Mon Jul 8 13:32:09 2024 +1200

    Expand Schema Cache to handle tables

    added flag in FeatureFlags to enable getting tables in
    the Namespace cache

    unit tests passing other than session cache tests

commit 1296c55
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Mon Jul 8 11:32:29 2024 +1200

    Refactor to add collection and table operations

    Existing operations are not CollectionOperations
    Added new TableOperations
Yuqi-Du pushed a commit that referenced this issue Jul 19, 2024
Refactoring for tables, this adds the first read code for
reading from a table and makes the schema cache handle Table objects.

Using the janky FeatureFlags class.

Builds and unit tests pass with the -Poffline profile.

This is a squash of multiple commits from the ajm/tables branch, cherry picked
into the ajm/tables-chunk-2 branch which is build on the ajm/tables-chunk-1
branch.

The commits squashed here were:

commit 045fe36
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 15:42:00 2024 -0700

    Fix other 3 offline test failures too

commit 791f2b2
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 15:39:11 2024 -0700

    Fix 2 offline unit tests

commit 284c6a8
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 15:30:31 2024 -0700

    mvn fmt:format

commit e50947d
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Tue Jul 9 10:18:58 2024 +1200

    Refactor to run with the offline profile

    and fixed all failing non integration tests

-> Merge commit, not cherry picked <-
commit ca476da
Merge: a2dcaf2 138b372
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 14:06:15 2024 -0700

    Merge branch 'main' into ajm/tables

-> came from merge above, not cherry picked <-
commit 138b372
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 13:29:16 2024 -0700

    Add second link to Azure OpenAI docs

-> Merge commit, not cherry picked <-
commit a2dcaf2
Merge: 5350744 96b2839
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 12:18:00 2024 -0700

    Merge branch 'main' into ajm/tables

commit 5350744
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 12:14:11 2024 -0700

    fmt:format for offline classes too

-> came from merge above, not cheery picked  <-
commit 96b2839
Author: Tatu Saloranta <tatu.saloranta@datastax.com>
Date:   Mon Jul 8 11:31:52 2024 -0700

    Fixes #1238: convert internal-only `ErrorCode`s into `ErrorCode.SERVER_INTERNAL_ERROR` (#1239)

commit 8f0ea75
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Mon Jul 8 18:59:29 2024 +1200

    Working to accept a command targeted at a table !

    Will failed in the CommandResolver because
    resolveTableCommand is not implemented in subclasses.

commit 607f0d8
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Mon Jul 8 13:32:09 2024 +1200

    Expand Schema Cache to handle tables

    added flag in FeatureFlags to enable getting tables in
    the Namespace cache

    unit tests passing other than session cache tests

commit 1296c55
Author: Aaron Morton <aaron.morton@datastax.com>
Date:   Mon Jul 8 11:32:29 2024 +1200

    Refactor to add collection and table operations

    Existing operations are not CollectionOperations
    Added new TableOperations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant