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

NullPointerException when error message of captured exception is null #1167

Closed
jsjtzyy opened this issue May 5, 2019 · 1 comment
Closed
Assignees

Comments

@jsjtzyy
Copy link
Contributor

jsjtzyy commented May 5, 2019

#1025 is merged with aim to catch disk I/O error. However, comparing error message with IO_ERROR_STR defined in StoreException is not a good way because error message could be null for IOException. Following is two examples from server log:

2019/05/03 00:00:00.130 ERROR [ReplicaThread] [Replica Thread-Inter0**-***] [ambry-server] [] Remote node: DataNode[***-****.***.linkedin.com:****] Thread name: Replica Thread-Inter0**-*** Remote replica: Replica[***-****.***.linkedin.com:****:/mnt/u010/ambrydata/43]
java.lang.NullPointerException
2019/05/04 00:11:34.476 ERROR [DiskManager] [store-startup-Partition[165]] [ambry-server] [] Exception while starting store for the partitionPartition[165]
com.github.ambry.store.StoreException: Error while starting store for dir /mnt/u010/ambrydata/165
        at com.github.ambry.store.BlobStore.start(BlobStore.java:233)
        at com.github.ambry.store.DiskManager.lambda$start$17(DiskManager.java:125)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at com.github.ambry.store.LogSegment.<init>(LogSegment.java:139)
        at com.github.ambry.store.Log.getSegmentsToLoad(Log.java:342)
        at com.github.ambry.store.Log.<init>(Log.java:78)
        at com.github.ambry.store.BlobStore.start(BlobStore.java:209)
        ... 2 more

We should first address NPE problem in this case and then figure out a good way to determine if IOException is related to Disk issue.

@jsjtzyy
Copy link
Contributor Author

jsjtzyy commented May 6, 2019

addressed in #1168

@jsjtzyy jsjtzyy closed this as completed May 6, 2019
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

1 participant