{"action":"created","issue":{"url":"https://api.github.com/repos/pravega/pravega/issues/2736","repository_url":"https://api.github.com/repos/pravega/pravega","labels_url":"https://api.github.com/repos/pravega/pravega/issues/2736/labels{/name}","comments_url":"https://api.github.com/repos/pravega/pravega/issues/2736/comments","events_url":"https://api.github.com/repos/pravega/pravega/issues/2736/events","html_url":"https://github.com/pravega/pravega/issues/2736","id":336695289,"node_id":"MDU6SXNzdWUzMzY2OTUyODk=","number":2736,"title":"Pravega doesn't always log unhandled exceptions","user":{"login":"EronWright","id":1775518,"node_id":"MDQ6VXNlcjE3NzU1MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/1775518?v=4","gravatar_id":"","url":"https://api.github.com/users/EronWright","html_url":"https://github.com/EronWright","followers_url":"https://api.github.com/users/EronWright/followers","following_url":"https://api.github.com/users/EronWright/following{/other_user}","gists_url":"https://api.github.com/users/EronWright/gists{/gist_id}","starred_url":"https://api.github.com/users/EronWright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EronWright/subscriptions","organizations_url":"https://api.github.com/users/EronWright/orgs","repos_url":"https://api.github.com/users/EronWright/repos","events_url":"https://api.github.com/users/EronWright/events{/privacy}","received_events_url":"https://api.github.com/users/EronWright/received_events","type":"User","site_admin":false},"labels":[{"id":406474446,"node_id":"MDU6TGFiZWw0MDY0NzQ0NDY=","url":"https://api.github.com/repos/pravega/pravega/labels/area/server","name":"area/server","color":"c2e0c6","default":false},{"id":406474440,"node_id":"MDU6TGFiZWw0MDY0NzQ0NDA=","url":"https://api.github.com/repos/pravega/pravega/labels/kind/bug","name":"kind/bug","color":"b60205","default":false}],"state":"open","locked":false,"assignee":{"login":"adrianmo","id":3786750,"node_id":"MDQ6VXNlcjM3ODY3NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/3786750?v=4","gravatar_id":"","url":"https://api.github.com/users/adrianmo","html_url":"https://github.com/adrianmo","followers_url":"https://api.github.com/users/adrianmo/followers","following_url":"https://api.github.com/users/adrianmo/following{/other_user}","gists_url":"https://api.github.com/users/adrianmo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianmo/subscriptions","organizations_url":"https://api.github.com/users/adrianmo/orgs","repos_url":"https://api.github.com/users/adrianmo/repos","events_url":"https://api.github.com/users/adrianmo/events{/privacy}","received_events_url":"https://api.github.com/users/adrianmo/received_events","type":"User","site_admin":false},"assignees":[{"login":"adrianmo","id":3786750,"node_id":"MDQ6VXNlcjM3ODY3NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/3786750?v=4","gravatar_id":"","url":"https://api.github.com/users/adrianmo","html_url":"https://github.com/adrianmo","followers_url":"https://api.github.com/users/adrianmo/followers","following_url":"https://api.github.com/users/adrianmo/following{/other_user}","gists_url":"https://api.github.com/users/adrianmo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianmo/subscriptions","organizations_url":"https://api.github.com/users/adrianmo/orgs","repos_url":"https://api.github.com/users/adrianmo/repos","events_url":"https://api.github.com/users/adrianmo/events{/privacy}","received_events_url":"https://api.github.com/users/adrianmo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-06-28T16:35:25Z","updated_at":"2018-07-18T09:03:52Z","closed_at":null,"author_association":"COLLABORATOR","body":"**Problem description**\r\nI observe that `PravegaRequestProcessor::handleException` doesn't log unhandled exceptions.   This is due to faulty logging code.  For example:\r\n```\r\n        } else {\r\n            log.error(\"Error (Segment = '{}', Operation = '{}')\", segment, operation, u);\r\n            connection.close(); // Closing connection should reinitialize things, and hopefully fix the problem\r\n            throw new IllegalStateException(\"Unknown exception.\", u);\r\n        }\r\n\r\n```\r\n\r\nObserve that the `error` method call is to the 'format string' overload, not the `Throwable` overload.\r\n\r\n**Problem location**\r\nThere seem to be dozens of sites where the wrong overload of `error` or `warn` is used.   Here's a list that was generated with the following command (with obvious false positives removed):\r\n```\r\ngrep -R --include=*.java -P -i 'log.(warn|error)\\(.*\\{.*,.*,.*\\)' .\r\n```\r\n\r\n```\r\n./client/src/main/java/io/pravega/client/segment/impl/AsyncSegmentInputStreamImpl.java:            log.warn(\"Exception while reading from Segment : {}\", segmentId, ex);\r\n./client/src/main/java/io/pravega/client/stream/impl/ControllerImpl.java:            log.warn(\"gRPC call for {} with trace id {} failed with server error.\", method, traceId, t);\r\n./client/src/main/java/io/pravega/client/stream/impl/EventStreamWriterImpl.java:                log.warn(\"Flush on segment {} failed due to {}, it will be retried.\", writer.getSegmentName(), e.getMessage());\r\n./client/src/main/java/io/pravega/client/stream/impl/EventStreamWriterImpl.java:                        log.warn(\"Close failed due to {}, it will be retried.\", e.getMessage());\r\n./client/src/main/java/io/pravega/client/stream/impl/SegmentSelector.java:                    log.error(\"Error while fetching successors for segment: {}\", sealedSegment, t);\r\n./controller/src/main/java/io/pravega/controller/eventProcessor/impl/EventProcessorCell.java:                    log.warn(\"Restarting event processor: {} due to exception: {}\", objectId, e);\r\n./controller/src/main/java/io/pravega/controller/eventProcessor/impl/EventProcessorCell.java:                    log.warn(\"Stopping event processor: {} due to exception: {}\", objectId, e);\r\n./controller/src/main/java/io/pravega/controller/server/eventProcessor/requesthandlers/CommitRequestHandler.java:                            log.error(\"Exception while attempting to commit transaction on epoch {} on stream {}/{}\", epoch, scope, stream, e);\r\n./controller/src/main/java/io/pravega/controller/server/eventProcessor/requesthandlers/DeleteStreamTask.java:                    log.error(\"{}/{} stream delete workflow threw exception.\", scope, stream, e);\r\n./controller/src/main/java/io/pravega/controller/server/eventProcessor/requesthandlers/ScaleOperationTask.java:                        log.warn(\"processing scale request for {}/{} segments {} failed {}\", request.getScope(), request.getStream(),\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:            log.warn(\"Create scope for {} failed due to authentication failure {}.\", createScopeRequest.getScopeName(), e);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:            log.warn(\"createScope for scope: {} failed, exception: {}\", createScopeRequest.getScopeName(), exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:                    log.warn(\"createStream for {}/{} failed {}: \", scopeName, streamConfiguration.getStreamName(),\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:            log.warn(\"deleteScope for {} failed with exception: {}\", scopeName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:           log.warn(\"deleteStream for {} failed with exception: {}\", streamName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:            log.warn(\"getReaderGroup for {} failed with exception: \", readerGroupName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:                        log.warn(\"getScope for {} failed with exception: {}\", scopeName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:                        log.warn(\"getStream for {}/{} failed with exception: {}\", scopeName, streamName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:                        log.warn(\"listReaderGroups for {} failed with exception: \", scopeName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:                        log.warn(\"listStreams for {} failed with exception: {}\", scopeName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:            log.warn(\"updateStream for {}/{} failed with exception: {}\", scopeName, streamName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/rest/resources/StreamMetadataResourceImpl.java:            log.warn(\"updateStreamState for {} failed with exception: {}\", streamName, exception);\r\n./controller/src/main/java/io/pravega/controller/server/retention/StreamCutBucketService.java:                e -> log.warn(\"exception thrown getting streams for bucket {}, e = {}\", bucketId, e), executor)\r\n./controller/src/main/java/io/pravega/controller/server/retention/StreamCutBucketService.java:                    log.warn(\"Exception thrown while performing auto retention for stream {} \", stream, e);\r\n./controller/src/main/java/io/pravega/controller/server/retention/StreamCutBucketService.java:                    log.warn(\"Unable to perform retention for stream {}. Ignoring, retention will be attempted in next cycle.\", stream, e);\r\n./controller/src/main/java/io/pravega/controller/server/rpc/auth/PravegaAuthManager.java:                        log.warn(\"Exception while initializing auth handler {}\", handler, e);\r\n./controller/src/main/java/io/pravega/controller/server/SegmentHelper.java:                log.error(\"CreateSegment {} threw exception\", qualifiedStreamSegmentName, error);\r\n./controller/src/main/java/io/pravega/controller/server/SegmentHelper.java:                log.error(\"truncateSegment {} error\", qualifiedName, error);\r\n./controller/src/main/java/io/pravega/controller/server/SegmentHelper.java:                log.error(\"deleteSegment {} failed\", qualifiedName, error);\r\n./controller/src/main/java/io/pravega/controller/server/SegmentHelper.java:                log.error(\"sealSegment {} failed\", qualifiedName, error);\r\n./controller/src/main/java/io/pravega/controller/server/SegmentHelper.java:                log.error(\"createTransaction {} failed\", transactionName, error);\r\n./controller/src/main/java/io/pravega/controller/server/SegmentHelper.java:                log.error(\"commitTransaction {} failed\", transactionName, error);\r\n./controller/src/main/java/io/pravega/controller/server/SegmentHelper.java:                log.error(\"getSegmentInfo {} failed\", qualifiedName, error);\r\n./controller/src/main/java/io/pravega/controller/store/stream/ZKStreamMetadataStore.java:                log.warn(\"unable to close watch on bucket {} with exception {}\", bucket, e);\r\n./controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java:                                    log.warn(\"Scale for stream {}/{} failed with exception {}\", scope, stream, cause);\r\n./controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java:                log.warn(\"exception while posting event {} {}\", e.getClass().getName(), e.getMessage());\r\n./controller/src/main/java/io/pravega/controller/task/Stream/TxnSweeper.java:                log.warn(\"Host={}, Caught exception sweeping orphaned transactions\", failedHost, e);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/delegationtoken/TokenVerifierImpl.java:                log.warn(\"Claim verification failed for resource {} because {}\", resource, e);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/AppendProcessor.java:            log.error(\"Append processor: Error {} on segment = '{}'\", doingWhat, segment, exception);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/AppendProcessor.java:            log.warn(\"Bad attribute update by {} on segment {}.\", writerId, segment, u);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/AppendProcessor.java:            log.warn(\"Token check failed while being written by {} on segment {}.\", writerId, segment, u);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/AppendProcessor.java:            log.warn(\"Unsupported Operation '{}'.\", doingWhat, u);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/AppendProcessor.java:            log.error(\"Error (Segment = '{}', Operation = 'append')\", segment, u);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/PravegaRequestProcessor.java:            log.error(\"Error (Segment = '{}', Operation = '{}')\", segment, operation, exception);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/PravegaRequestProcessor.java:            log.warn(\"Unsupported Operation '{}'.\", operation, u);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/PravegaRequestProcessor.java:            log.error(\"Error (Segment = '{}', Operation = '{}')\", segment, operation, u);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/PravegaRequestProcessor.java:                            log.error(\"exception while computing stats while merging txn {}\", mergeSegments, e);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/stat/SegmentStatsRecorderImpl.java:            log.warn(\"Record statistic for {} for data: {} and events:{} threw exception\", streamSegmentName, dataLength, numOfEvents, e);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/ZKSegmentContainerMonitor.java:                                log.warn(\"Stopping container {} failed: {}\", containerId, throwable);\r\n./segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/ZKSegmentContainerMonitor.java:                                log.warn(\"Starting container {} failed: {}\", containerId, ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/attributes/SegmentAttributeIndex.java:                log.warn(\"{}: Snapshot serialized to attribute segment, but failed to update snapshot location or truncate Attribute Segment.\", this.traceObjectId, ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/CacheManager.java:            log.error(\"{}: Error.\", TRACE_OBJECT_ID, ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/CacheManager.java:                log.warn(\"{} Unable to update client {}. {}\", TRACE_OBJECT_ID, c, ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/StreamSegmentContainer.java:            log.warn(\"{}: {} failed. Shutting down StreamSegmentContainer.\", this.traceObjectId, componentName, cause);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/StreamSegmentMapper.java:                        log.warn(\"{}: Missing or corrupt State File for existing Segment '{}'; recreating.\", this.traceObjectId, segmentName, ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/DurableLog.java:            log.error(\"{} Recovery FAILED.\", this.traceObjectId, ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/DurableLog.java:                    log.warn(\"{}: Unable to disable log after DataCorruptionException during recovery.\", this.traceObjectId, disableEx);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/DurableLog.java:                        log.warn(\"{}: Error caught while waiting for {}: {}.\", this.traceObjectId, ProbeOperation.class.getSimpleName(), ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/DurableLog.java:        log.warn(\"{}: QueueProcessor failed with exception {}\", this.traceObjectId, cause);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/OperationProcessor.java:        log.warn(\"{}: Cancelling {} operations with exception: {}.\", this.traceObjectId, cancelCount, failException.toString());\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/OperationProcessor.java:            log.error(\"{}: MemoryStateUpdater.process failure.\", traceObjectId, ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/StreamSegmentContainerRegistry.java:        log.error(\"Critical failure for SegmentContainer {}. {}\", containerWithHandle, exception);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/StorageWriter.java:            log.error(\"{}: Iteration[{}].CriticalError.\", this.traceObjectId, this.state.getIterationId(), ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/StorageWriter.java:            log.error(\"{}: Iteration[{}].Error.\", this.traceObjectId, this.state.getIterationId(), ex);\r\n./segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/StorageWriter.java:        log.warn(\"{}: Iteration[{}].HandledError {}\", this.traceObjectId, this.state.getIterationId(), ex.toString());\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:        log.warn(\"{}: Too many write processor failures; closing.\", this.traceObjectId, exception);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:        log.warn(\"{}: Too many rollover failures; closing.\", this.traceObjectId, exception);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:                    log.error(\"{}: Unable to close LedgerHandle for Ledger {}.\", this.traceObjectId, writeLedger.ledger.getId(), bkEx);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:                log.warn(\"{}: Unable to delete orphan empty ledger {}.\", this.traceObjectId, id, ex);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:                log.warn(\"{}: Not running WriteProcessor as part of callback due to BookKeeperLog being closed.\", this.traceObjectId, ex);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:            log.warn(\"{}: Caught ObjectClosedException but not closed; closing now.\", this.traceObjectId, ex);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:                log.error(\"{}: Unable to delete truncated ledger {}.\", this.traceObjectId, lm.getLedgerId(), ex);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java:                log.warn(\"{}: Unable to delete newly created ledger {}.\", this.traceObjectId, newLedger.getId(), deleteEx);\r\n./segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/LogReader.java:                    log.error(\"Unable to close LedgerHandle for Ledger {}.\", this.currentLedger.handle.getId(), bkEx);\r\n./segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingStorage.java:                    log.warn(\"Could not create Header Segment for '{}', rolling back.\", segmentName, ex);\r\n./segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingStorage.java:                    log.warn(\"Attempted to delete concat source Header '{}' but it doesn't exist.\", source.getHeaderHandle().getSegmentName(), ex);\r\n./shared/metrics/src/main/java/io/pravega/shared/metrics/StatsLoggerImpl.java:            log.warn(\"createStats failure: {}\", statName, e);\r\n./shared/metrics/src/main/java/io/pravega/shared/metrics/StatsLoggerImpl.java:            log.warn(\"createCounter failure: {}\", statName, e);\r\n./shared/metrics/src/main/java/io/pravega/shared/metrics/StatsLoggerImpl.java:            log.warn(\"registerGauge failure: {}\", statName, e);\r\n./shared/metrics/src/main/java/io/pravega/shared/metrics/StatsLoggerImpl.java:            log.warn(\"createMeter failure: {}\", statName, e);\r\n./standalone/src/main/java/io/pravega/local/InProcPravegaCluster.java:                log.warn(\"Not able to delete path {} . Exception {}\", path, e.getMessage());\r\n./test/system/src/main/java/io/pravega/test/system/framework/TestFrameworkException.java:        log.error(\"TestFramework Exception. Type: {}, Details: {}\", type, reason, cause);\r\n./test/system/src/test/java/io/pravega/test/system/AbstractScaleTests.java:                log.error(\"test {} failed with exception {}\", testName, e);\r\n./test/system/src/test/java/io/pravega/test/system/ReaderCheckpointTest.java:            log.error(\"Exception while reading event using readerId: {}\", readerId, e);\r\n./test/system/src/test/java/io/pravega/test/system/ReaderCheckpointTest.java:                t -> log.error(\"Error observed while reading events for reader id :{}\", readerId, t));\r\n./test/system/src/test/java/io/pravega/test/system/ReaderCheckpointTest.java:                    log.error(\"Exception while reading event using readerId: {}\", readerId, e);\r\n```\r\n\r\n**Suggestions for an improvement**\r\n"},"comment":{"url":"https://api.github.com/repos/pravega/pravega/issues/comments/405862966","html_url":"https://github.com/pravega/pravega/issues/2736#issuecomment-405862966","issue_url":"https://api.github.com/repos/pravega/pravega/issues/2736","id":405862966,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTg2Mjk2Ng==","user":{"login":"adrianmo","id":3786750,"node_id":"MDQ6VXNlcjM3ODY3NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/3786750?v=4","gravatar_id":"","url":"https://api.github.com/users/adrianmo","html_url":"https://github.com/adrianmo","followers_url":"https://api.github.com/users/adrianmo/followers","following_url":"https://api.github.com/users/adrianmo/following{/other_user}","gists_url":"https://api.github.com/users/adrianmo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianmo/subscriptions","organizations_url":"https://api.github.com/users/adrianmo/orgs","repos_url":"https://api.github.com/users/adrianmo/repos","events_url":"https://api.github.com/users/adrianmo/events{/privacy}","received_events_url":"https://api.github.com/users/adrianmo/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T09:03:52Z","updated_at":"2018-07-18T09:03:52Z","author_association":"COLLABORATOR","body":"Correct, as an example, the line below, which uses the `warn(String format, Object arg1, Object arg2)` overload method\r\n\r\nhttps://github.com/pravega/pravega/blob/3f3008b727e39e1d6dd1bbfa90cfd0087af3c208/segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/PravegaRequestProcessor.java#L450\r\n\r\ngenerates the following log:\r\n\r\n```\r\n2018-07-18 10:52:56,741 WARN handler.PravegaRequestProcessor (PravegaRequestProcessor.java:handleException(450)) - Unsupported Operation 'Create segment'.\r\njava.lang.UnsupportedOperationException: createStreamSegment is unsupported on ReadOnlySegmentContainer\r\n\tat io.pravega.segmentstore.server.containers.ReadOnlySegmentContainer.unsupported(ReadOnlySegmentContainer.java:195)\r\n\tat io.pravega.segmentstore.server.containers.ReadOnlySegmentContainer.createStreamSegment(ReadOnlySegmentContainer.java:171)\r\n\tat io.pravega.segmentstore.server.store.StreamSegmentService.lambda$createStreamSegment$6(StreamSegmentService.java:112)\r\n\tat io.pravega.segmentstore.server.store.StreamSegmentService.invoke(StreamSegmentService.java:174)\r\n\tat io.pravega.segmentstore.server.store.StreamSegmentService.createStreamSegment(StreamSegmentService.java:110)\r\n\tat io.pravega.segmentstore.server.mocks.SynchronousStreamSegmentStore.createStreamSegment(SynchronousStreamSegmentStore.java:81)\r\n\tat io.pravega.segmentstore.server.host.handler.PravegaRequestProcessor.createSegment(PravegaRequestProcessor.java:399)\r\n\tat io.pravega.segmentstore.server.host.handler.PravegaRequestProcessorTest.testUnsupportedOperation(PravegaRequestProcessorTest.java:493)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\r\n\tat org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)\r\n\tat org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n```\r\n\r\nThe same happens with the `error/warn/info/debug(String format, Object... arguments)` overload methods. Example:\r\n\r\nhttps://github.com/pravega/pravega/blob/3f3008b727e39e1d6dd1bbfa90cfd0087af3c208/segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/handler/PravegaRequestProcessor.java#L456\r\n\r\n```\r\n2018-07-18 11:01:09,956 ERROR handler.PravegaRequestProcessor (PravegaRequestProcessor.java:handleException(456)) - Error (Segment = 'testSegmentAttribute', Operation = 'Update attribute')\r\nio.pravega.segmentstore.contracts.BadAttributeUpdateException: [Segment 'testSegmentAttribute'] Bad Attribute Update (AttributeId = 94735710-2919-47a7-868d-f6936882ca25, Value = 5, UpdateType = ReplaceIfEquals): Expected existing value to be '-9223372036854775808', actual '1'..\r\n\tat io.pravega.segmentstore.server.logs.SegmentMetadataUpdateTransaction.preProcessAttributes(SegmentMetadataUpdateTransaction.java:429)\r\n\tat io.pravega.segmentstore.server.logs.SegmentMetadataUpdateTransaction.preProcessOperation(SegmentMetadataUpdateTransaction.java:274)\r\n\tat io.pravega.segmentstore.server.logs.ContainerMetadataUpdateTransaction.preProcessOperation(ContainerMetadataUpdateTransaction.java:321)\r\n\tat io.pravega.segmentstore.server.logs.OperationMetadataUpdater.preProcessOperation(OperationMetadataUpdater.java:224)\r\n\tat io.pravega.segmentstore.server.logs.OperationProcessor.processOperation(OperationProcessor.java:364)\r\n\tat io.pravega.segmentstore.server.logs.OperationProcessor.processOperations(OperationProcessor.java:283)\r\n\tat java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)\r\n\tat java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)\r\n\tat java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)\r\n\tat io.pravega.test.common.InlineExecutor.execute(InlineExecutor.java:34)\r\n\tat java.util.concurrent.CompletableFuture$UniCompletion.claim(CompletableFuture.java:529)\r\n\tat java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:653)\r\n\tat java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)\r\n\tat java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)\r\n\tat java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)\r\n\tat io.pravega.common.util.BlockingDrainingQueue.add(BlockingDrainingQueue.java:115)\r\n\tat io.pravega.segmentstore.server.logs.OperationProcessor.process(OperationProcessor.java:216)\r\n\tat io.pravega.segmentstore.server.logs.DurableLog.add(DurableLog.java:298)\r\n\tat io.pravega.segmentstore.server.containers.StreamSegmentContainer.processAttributeUpdaterOperation(StreamSegmentContainer.java:563)\r\n\tat io.pravega.segmentstore.server.containers.StreamSegmentContainer.lambda$updateAttributes$8(StreamSegmentContainer.java:330)\r\n\tat io.pravega.segmentstore.server.containers.StreamSegmentMapper.getOrAssignStreamSegmentId(StreamSegmentMapper.java:286)\r\n...\r\n```"}}
{"actor":{"display_login":"adrianmo"}}