java.lang.IllegalArgumentException: Store 'stotch_test_4'. Error: Sum total of zones (6) does not match the total replication factor (8)

Google Groups | Miguel Ausó | 1 year ago
  1. 0

    Replication behavior

    Google Groups | 1 year ago | Miguel Ausó
    java.lang.IllegalArgumentException: Store 'stotch_test_4'. Error: Sum total of zones (6) does not match the total replication factor (8)
  2. 0

    Hi. I've been testing my spring-based software under load, during which something like 50 entities were created and inserted into empty database. At the same time, my background repository walker, which uses `findAll(Pageable pageable)` to infinitely walk through all entities, was searching for stale records to mark them as expired. In the middle of that process, i think, Spring component made two queries to database: count all records and then fetch necessary ones, and the first query counted lesser amount of records than second one returned. All of that resulted in an exception, since PageImpl expects content to be lesser than or equal to total records count: {code:java} Exception in thread "Maintenance // Stale redirect resolver" java.lang.IllegalArgumentException: Total must not be less than the number of elements given! at org.springframework.util.Assert.isTrue(Assert.java:68) at org.springframework.data.domain.PageImpl.<init>(PageImpl.java:47) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.readPage(SimpleJpaRepository.java:498) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:394) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:363) at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:414) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:399) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:371) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodIntercceptor.invoke(CrudMethodMetadataPostProcessor.java:122) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy73.findAll(Unknown Source) {code} I've been using that setup for three months, but that's the first time i ever meet that exception.

    Spring JIRA | 1 year ago | Etki
    java.lang.IllegalArgumentException: Total must not be less than the number of elements given!
  3. 0

    Hi. I've been testing my spring-based software under load, during which something like 50 entities were created and inserted into empty database. At the same time, my background repository walker, which uses `findAll(Pageable pageable)` to infinitely walk through all entities, was searching for stale records to mark them as expired. In the middle of that process, i think, Spring component made two queries to database: count all records and then fetch necessary ones, and the first query counted lesser amount of records than second one returned. All of that resulted in an exception, since PageImpl expects content to be lesser than or equal to total records count: {code:java} Exception in thread "Maintenance // Stale redirect resolver" java.lang.IllegalArgumentException: Total must not be less than the number of elements given! at org.springframework.util.Assert.isTrue(Assert.java:68) at org.springframework.data.domain.PageImpl.<init>(PageImpl.java:47) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.readPage(SimpleJpaRepository.java:498) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:394) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:363) at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:414) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:399) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:371) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodIntercceptor.invoke(CrudMethodMetadataPostProcessor.java:122) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy73.findAll(Unknown Source) {code} I've been using that setup for three months, but that's the first time i ever meet that exception.

    Spring JIRA | 1 year ago | Etki
    java.lang.IllegalArgumentException: Total must not be less than the number of elements given!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HistogramLogProcessor does not support IntCountsHistogram

    GitHub | 1 year ago | kirtiteja
    java.lang.IllegalArgumentException: The buffer's encoded value byte size (4) does not match the Histogram's (8)
  6. 0

    [TEST-FAILURE] InvalidConfigurationTest.testWhenValid_AsyncSemaphoreBackupCount

    GitHub | 2 years ago | bilalyasar
    java.lang.IllegalArgumentException: the sum of backup-count and async-backup-count can't be larger than than 6

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Store 'stotch_test_4'. Error: Sum total of zones (6) does not match the total replication factor (8)

      at voldemort.store.StoreDefinition.throwIllegalException()
    2. voldemort.store
      StoreDefinitionBuilder.build
      1. voldemort.store.StoreDefinition.throwIllegalException(StoreDefinition.java:122)
      2. voldemort.store.StoreDefinition.checkParameterLegality(StoreDefinition.java:186)
      3. voldemort.store.StoreDefinitionBuilder.build(StoreDefinitionBuilder.java:323)
      3 frames
    3. voldemort.xml
      StoreDefinitionsMapper.readStoreList
      1. voldemort.xml.StoreDefinitionsMapper.readStore(StoreDefinitionsMapper.java:294)
      2. voldemort.xml.StoreDefinitionsMapper.readStoreList(StoreDefinitionsMapper.java:147)
      3. voldemort.xml.StoreDefinitionsMapper.readStoreList(StoreDefinitionsMapper.java:129)
      4. voldemort.xml.StoreDefinitionsMapper.readStoreList(StoreDefinitionsMapper.java:121)
      4 frames
    4. voldemort.tools.admin
      VAdminTool.main
      1. voldemort.tools.admin.command.AdminCommandStore$SubCommandStoreAdd.doStoreAdd(AdminCommandStore.java:219)
      2. voldemort.tools.admin.command.AdminCommandStore$SubCommandStoreAdd.executeCommand(AdminCommandStore.java:204)
      3. voldemort.tools.admin.command.AdminCommandStore.executeCommand(AdminCommandStore.java:51)
      4. voldemort.tools.admin.command.AdminCommand.executeCommand(AdminCommand.java:51)
      5. voldemort.tools.admin.VAdminTool.main(VAdminTool.java:30)
      5 frames