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

incorrectly linearScan to 0x7fffffffffffffff #672

Closed
RobAustin opened this issue May 14, 2020 · 1 comment
Closed

incorrectly linearScan to 0x7fffffffffffffff #672

RobAustin opened this issue May 14, 2020 · 1 comment
Assignees

Comments

@RobAustin
Copy link
Member

RobAustin commented May 14, 2020

given that 0x7fffffffffffffff is not a valid index it should not do a linear scan here

see - https://teamcity.chronicle.software/repository/download/OpenHFT_ReleaseJob_ReleaseByArtifact/409946:id/ReleaseAutomation/projects/chronicle-queue-runTests-1589447515464.log

[main] WARN net.openhft.chronicle.queue.impl.single.SCQIndexing - Took 327 us to linearScan by position from 131256 to 9223372036854775807 = (0x7fffffffffffffff-0x200b8)=9223372036854644551
net.openhft.chronicle.core.StackTrace: This is a profile stack trace, not an ERROR
	at net.openhft.chronicle.queue.impl.single.SCQIndexing.printLinearScanTime(SCQIndexing.java:336)
	at net.openhft.chronicle.queue.impl.single.SCQIndexing.linearScanByPosition(SCQIndexing.java:404)
	at net.openhft.chronicle.queue.impl.single.SCQIndexing.sequenceForPosition(SCQIndexing.java:531)
	at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueStore.sequenceForPosition(SingleChronicleQueueStore.java:281)
	at net.openhft.chronicle.queue.MoveToWrongIndexThenToEndTest.approximateLastIndex(MoveToWrongIndexThenToEndTest.java:172)
	at net.openhft.chronicle.queue.MoveToWrongIndexThenToEndTest.getLastIndex(MoveToWrongIndexThenToEndTest.java:143)
	at net.openhft.chronicle.queue.MoveToWrongIndexThenToEndTest.testBufferUnderflowException(MoveToWrongIndexThenToEndTest.java:68)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
@dpisklov
Copy link
Contributor

0x7fffffffffffffff is Long.MAX_VALUE and indeed it is explicitly called:

long seq = wireStore.sequenceForPosition(tailer, Long.MAX_VALUE, false);

Don't see anything wrong here, so closing - reopen if you disagree.

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

No branches or pull requests

2 participants