Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-408

Stream<T> findAll() does not execute a streaming query

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Works as Designed
    • Affects Version/s: 1.5.1 (Ingalls SR1)
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      I followed the sample here: https://github.com/spring-projects/spring-data-examples/tree/master/cassandra/java8

      I noticed that my Stream<T> findAll() query seemed to be taking a very long time to return as if it was collecting the entire ResultSet in memory before returning and it does seem to be the case. As far as I can tell this is specifically related to declaring a method with the signature:

      Stream<T> findAll();
      

      As a slight alteration such as:

      Stream<T> findAllBy();
      

      Works absolutely fine and streams back the data. I've tracked the issue down to org.springframework.data.repository.core.support.RepositoryFactorySupport on line 482 at the call to the method hasQueryFor(method) seems to return false for findAll but actually finds a query for findAllBy

      For findAll() it ends up resolving to public java.lang.Iterable org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.findAll()

      A lot of this query resolution logic seems to reside in spring-data-commons so I'm not quite sure where the fault lies in this case.

        Attachments

          Activity

            People

            Assignee:
            mp911de Mark Paluch
            Reporter:
            roberthunt87@gmail.com Robert Hunt
            Last updater:
            Robert Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 30 weeks, 5 days ago