Details

    • Type: Test
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      There are some warning message in the rocketmq-storage module which need to be taken care.

      Running com.alibaba.rocketmq.store.MappedFileQueueTest

      12:30:56.606 [main] WARN  RocketmqStoreError - findMappedFileByOffset offset not matched, request Offset: 4096, index: 4, mappedFileSize: 1024, mappedFiles count: 4, StackTrace:
      	java.lang.Thread.getStackTrace(Thread.java:1552)
      	com.alibaba.rocketmq.common.UtilAll.currentStackTrace(UtilAll.java:60)
      	com.alibaba.rocketmq.store.MappedFileQueue.findMappedFileByOffset(MappedFileQueue.java:474)
      	com.alibaba.rocketmq.store.MappedFileQueue.findMappedFileByOffset(MappedFileQueue.java:510)
      	com.alibaba.rocketmq.store.MappedFileQueueTest.test_findMapedFileByOffset(MappedFileQueueTest.java:114)
      	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

      Running com.alibaba.rocketmq.store.DefaultMessageStoreTest

      12:30:49.723 [main] WARN  RocketmqStore - /Users/njiang/store/commitlog/00000000000000032768	32768 length not matched message store config value, ignore it
      12:30:52.770 [AcceptSocketService] ERROR RocketmqStore - AcceptSocketService service end
      12:30:52.774 [AllocateMappedFileService] WARN  RocketmqStore - AllocateMappedFileService service has exception, maybe by shutdown
      12:30:52.785 [main] WARN  RocketmqStore - /Users/njiang/store/commitlog/00000000000000032768	32768 length not matched message store config value, ignore it
      12:30:52.790 [main] ERROR RocketmqStore - beginAccept exception
      java.net.BindException: Address already in use
      	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_91]
      	at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_91]
      	at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_91]
      	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_91]
      	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_91]
      	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67) ~[na:1.8.0_91]
      	at com.alibaba.rocketmq.store.ha.HAService$AcceptSocketService.beginAccept(HAService.java:189) ~[classes/:na]
      	at com.alibaba.rocketmq.store.ha.HAService.start(HAService.java:120) [classes/:na]
      	at com.alibaba.rocketmq.store.DefaultMessageStore.start(DefaultMessageStore.java:209) [classes/:na]
      	at com.alibaba.rocketmq.store.DefaultMessageStoreTest.test_group_commit(DefaultMessageStoreTest.java:133) [test-classes/:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
      

        Issue Links

          Activity

          Hide
          roman_s Roman Shtykh added a comment -

          Partial duplicate of https://issues.apache.org/jira/browse/ROCKETMQ-2

          I propose handle only com.alibaba.rocketmq.store.MappedFileQueueTest at this ticket, since "Address already in use" is done at ROCKETMQ-2.

          Show
          roman_s Roman Shtykh added a comment - Partial duplicate of https://issues.apache.org/jira/browse/ROCKETMQ-2 I propose handle only com.alibaba.rocketmq.store.MappedFileQueueTest at this ticket, since "Address already in use" is done at ROCKETMQ-2 .
          Hide
          njiang Willem Jiang added a comment -

          There are some new warning and error message after applied the patch of ROCKETMQ-2.
          So I reopen the issue here.

          Running com.alibaba.rocketmq.store.DefaultMessageStoreTest
          10:28:18.521 [main] WARN  RocketmqStore - /Users/njiang/store/commitlog/00000000000000032768	32768 length not matched message store config value, ignore it
          10:28:21.563 [AcceptSocketService] ERROR RocketmqStore - AcceptSocketService service end
          10:28:21.568 [AllocateMappedFileService] WARN  RocketmqStore - AllocateMappedFileService service has exception, maybe by shutdown
          10:28:21.579 [main] WARN  RocketmqStore - /Users/njiang/store/commitlog/00000000000000032768	32768 length not matched message store config value, ignore it
          10:28:21.591 [GroupCommitService] WARN  RocketmqStoreError - findMappedFileByOffset offset not matched, request Offset: 8192, index: 1, mappedFileSize: 8192, mappedFiles count: 1, StackTrace:
          	java.lang.Thread.getStackTrace(Thread.java:1552)
          	com.alibaba.rocketmq.common.UtilAll.currentStackTrace(UtilAll.java:60)
          	com.alibaba.rocketmq.store.MappedFileQueue.findMappedFileByOffset(MappedFileQueue.java:474)
          	com.alibaba.rocketmq.store.MappedFileQueue.flush(MappedFileQueue.java:434)
          	com.alibaba.rocketmq.store.CommitLog$GroupCommitService.doCommit(CommitLog.java:1028)
          	com.alibaba.rocketmq.store.CommitLog$GroupCommitService.run(CommitLog.java:1039)
          	java.lang.Thread.run(Thread.java:745)
          10:28:21.627 [AllocateMappedFileService] WARN  RocketmqStore - create mappedFile spent time(ms) 36 queue size 0 /Users/njiang/store/commitlog/00000000000000016384 8192
          10:28:24.598 [AcceptSocketService] ERROR RocketmqStore - AcceptSocketService service end
          10:28:24.614 [AllocateMappedFileService] WARN  RocketmqStore - AllocateMappedFileService service has exception, maybe by shutdown
          Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.606 sec - in com.alibaba.rocketmq.store.DefaultMessageStoreTest
          Running com.alibaba.rocketmq.store.index.IndexFileTest
          10:28:24.888 [main] WARN  RocketmqStore - putKey index count 400 index max num 400
          10:28:24.889 [main] WARN  RocketmqStore - putKey index count 400 index max num 400
          
          Show
          njiang Willem Jiang added a comment - There are some new warning and error message after applied the patch of ROCKETMQ-2 . So I reopen the issue here. Running com.alibaba.rocketmq.store.DefaultMessageStoreTest 10:28:18.521 [main] WARN RocketmqStore - /Users/njiang/store/commitlog/00000000000000032768 32768 length not matched message store config value, ignore it 10:28:21.563 [AcceptSocketService] ERROR RocketmqStore - AcceptSocketService service end 10:28:21.568 [AllocateMappedFileService] WARN RocketmqStore - AllocateMappedFileService service has exception, maybe by shutdown 10:28:21.579 [main] WARN RocketmqStore - /Users/njiang/store/commitlog/00000000000000032768 32768 length not matched message store config value, ignore it 10:28:21.591 [GroupCommitService] WARN RocketmqStoreError - findMappedFileByOffset offset not matched, request Offset: 8192, index: 1, mappedFileSize: 8192, mappedFiles count: 1, StackTrace: java.lang. Thread .getStackTrace( Thread .java:1552) com.alibaba.rocketmq.common.UtilAll.currentStackTrace(UtilAll.java:60) com.alibaba.rocketmq.store.MappedFileQueue.findMappedFileByOffset(MappedFileQueue.java:474) com.alibaba.rocketmq.store.MappedFileQueue.flush(MappedFileQueue.java:434) com.alibaba.rocketmq.store.CommitLog$GroupCommitService.doCommit(CommitLog.java:1028) com.alibaba.rocketmq.store.CommitLog$GroupCommitService.run(CommitLog.java:1039) java.lang. Thread .run( Thread .java:745) 10:28:21.627 [AllocateMappedFileService] WARN RocketmqStore - create mappedFile spent time(ms) 36 queue size 0 /Users/njiang/store/commitlog/00000000000000016384 8192 10:28:24.598 [AcceptSocketService] ERROR RocketmqStore - AcceptSocketService service end 10:28:24.614 [AllocateMappedFileService] WARN RocketmqStore - AllocateMappedFileService service has exception, maybe by shutdown Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.606 sec - in com.alibaba.rocketmq.store.DefaultMessageStoreTest Running com.alibaba.rocketmq.store.index.IndexFileTest 10:28:24.888 [main] WARN RocketmqStore - putKey index count 400 index max num 400 10:28:24.889 [main] WARN RocketmqStore - putKey index count 400 index max num 400
          Hide
          roman_s Roman Shtykh added a comment -

          Thanks, Willem, I will have a look!

          Show
          roman_s Roman Shtykh added a comment - Thanks, Willem, I will have a look!
          Hide
          roman_s Roman Shtykh added a comment - - edited

          Willem Jiang These are all the warnings that existed before (see the Description section and the warnings you pasted), what are new errors and how ROCKETMQ-2 could be the cause?

          Anyway, I am going to look at this closer, thanks!

          Show
          roman_s Roman Shtykh added a comment - - edited Willem Jiang These are all the warnings that existed before (see the Description section and the warnings you pasted), what are new errors and how ROCKETMQ-2 could be the cause? Anyway, I am going to look at this closer, thanks!
          Hide
          roman_s Roman Shtykh added a comment -

          Can't change the status of this JIRA issue.

          Show
          roman_s Roman Shtykh added a comment - Can't change the status of this JIRA issue.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user shroman opened a pull request:

          https://github.com/apache/incubator-rocketmq/pull/14

          ROCKETMQ-9 Errors in rocketmq-store module.

          JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-9

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/shroman/incubator-rocketmq ROCKETMQ-9

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/incubator-rocketmq/pull/14.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #14


          commit a8d330c59f6300281f3d950323836a8be7fc3624
          Author: shtykh_roman <rshtykh@yahoo.com>
          Date: 2016-12-26T09:32:00Z

          ROCKETMQ-9 Errors in rocketmq-store module.

          JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-9


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user shroman opened a pull request: https://github.com/apache/incubator-rocketmq/pull/14 ROCKETMQ-9 Errors in rocketmq-store module. JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-9 You can merge this pull request into a Git repository by running: $ git pull https://github.com/shroman/incubator-rocketmq ROCKETMQ-9 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/14.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #14 commit a8d330c59f6300281f3d950323836a8be7fc3624 Author: shtykh_roman <rshtykh@yahoo.com> Date: 2016-12-26T09:32:00Z ROCKETMQ-9 Errors in rocketmq-store module. JIRA issue: https://issues.apache.org/jira/browse/ROCKETMQ-9
          Hide
          roman_s Roman Shtykh added a comment -

          vongosling Willem Jiang

          Completed checking the issue.

          There is nothing wrong with the warnings per se, as they are displayed when a checked erroneous condition happens in tests. But having such messages looks a bit dirty, so I disabled them for tests.
          I also improved messages and commented the methods as I understood how they work.

          More detailed comments:
          WARN RocketmqStore - AllocateMappedFileService interrupted, possibly by shutdown
          Looking at how the service implemented (interruption is done on shutdown), it is an expected thing.

          WARN RocketmqStore - putKey index count 400 index max num 400
          Expected warning. Over capacity. It is covered by tests. Improved the messages.

          WARN RocketmqStoreError - findMappedFileByOffset offset not matched
          If returnFirstOnNotFound is false, probably there's no need to show stack trace. So it is shown only when the method fails.

          Now it is ready for review.

          Show
          roman_s Roman Shtykh added a comment - vongosling Willem Jiang Completed checking the issue. There is nothing wrong with the warnings per se, as they are displayed when a checked erroneous condition happens in tests. But having such messages looks a bit dirty, so I disabled them for tests. I also improved messages and commented the methods as I understood how they work. More detailed comments: WARN RocketmqStore - AllocateMappedFileService interrupted, possibly by shutdown Looking at how the service implemented (interruption is done on shutdown), it is an expected thing. WARN RocketmqStore - putKey index count 400 index max num 400 Expected warning. Over capacity. It is covered by tests. Improved the messages. WARN RocketmqStoreError - findMappedFileByOffset offset not matched If returnFirstOnNotFound is false , probably there's no need to show stack trace. So it is shown only when the method fails. Now it is ready for review.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user WillemJiang commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/14

          Just merged the patch into master and I also did some code clean up.

          Show
          githubbot ASF GitHub Bot added a comment - Github user WillemJiang commented on the issue: https://github.com/apache/incubator-rocketmq/pull/14 Just merged the patch into master and I also did some code clean up.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman closed the pull request at:

          https://github.com/apache/incubator-rocketmq/pull/14

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/14
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/14

          Thanks, @WillemJiang I wil close the issue then.

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman commented on the issue: https://github.com/apache/incubator-rocketmq/pull/14 Thanks, @WillemJiang I wil close the issue then.
          Hide
          roman_s Roman Shtykh added a comment -

          Willem Jiang It seems I cannot change the status of JIRA issues created by others. Can you please close this?

          Show
          roman_s Roman Shtykh added a comment - Willem Jiang It seems I cannot change the status of JIRA issues created by others. Can you please close this?
          Hide
          njiang Willem Jiang added a comment -

          sure, I just closed it.

          Show
          njiang Willem Jiang added a comment - sure, I just closed it.

            People

            • Assignee:
              roman_s Roman Shtykh
              Reporter:
              njiang Willem Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development