DataStax C# Driver for Apache Cassandra
  1. DataStax C# Driver for Apache Cassandra
  2. CSHARP-170

When Changing Key Space after a Prepare, the driver goes into a recursive exception pattern causing the application to be blocked

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.2
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Environment:

      DSE 2.0.9

      Description

      When changing key spaces after a prepare the C* server cannot "find" the previous prepare and issues an error which the driver tries to re-issue the prepare which causes a recursive error pattern. When this occurs the application is blocked waiting for the Execute to complete which it cannot.

      This seems to only occur on DSE 2.0.9 (this issue does not seem to occur on 2.0.7 or 2.0.8 of C*). I have included a demo project and some screen shots of the driver trace and breakpoints within the driver to show the recursive exception.

      The workaround is to remove the prepare and use SimpleStatement or move the prepare after the change keyspace.

      1. Demo of Code that Causes Hang.jpg
        109 kB
      2. Driver Trace.jpg
        332 kB
      3. MSVSDuggerHandleException.jpg
        496 kB

        Activity

        Hide
        jonathan lacefield added a comment -

        with the Java driver, we often times recommend instantiating different session objects at a keyspace grain. We persist these session objects in a map and call the right session object as needed, for keyspace specific operations. Is this pattern applicable to the C# dirver?

        Show
        jonathan lacefield added a comment - with the Java driver, we often times recommend instantiating different session objects at a keyspace grain. We persist these session objects in a map and call the right session object as needed, for keyspace specific operations. Is this pattern applicable to the C# dirver?
        Hide
        Jorge Bay Gondra added a comment -

        Definitely, one Session instance per keyspace is the right approach.

        Show
        Jorge Bay Gondra added a comment - Definitely, one Session instance per keyspace is the right approach.

          People

          • Assignee:
            Unassigned
            Reporter:
            Richard Andersen
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development