Bug 1428027

Summary: DMR operation register-proto-schemas fails with NPE if the proto file has syntax errors
Product: [JBoss] JBoss Data Grid 6 Reporter: wfink
Component: ServerAssignee: Tristan Tarrant <ttarrant>
Status: VERIFIED --- QA Contact: Martin Gencur <mgencur>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6.0, 6.6.1CC: jdg-bugs, jsenko
Target Milestone: CR2   
Target Release: 6.6.2   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1432189 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1374440, 1432189    

Description wfink 2017-03-01 17:49:20 UTC
Description of problem:

Since the file has syntax errors it should still be placed in the ___protobuf_metadata cache and a myFileWithSyntaxErrors.proto.errors key should also be created. No exception should be thrown. Currently no key is written in cache and the NPE from the attached log happens.

When registering a proper file without syntax errors this works correctly.

The problem disappears if I disable global state persistence, so the cachestore seems to play a role in this.

How reproducible:
Start an infinispan server and run the following CLI command:

./bin/ispn-cli.sh -c '/subsystem=datagrid-infinispan/cache-container=local:register-proto-schemas(file-names=[myFileWithSyntaxErrors.proto], file-contents=[kaboom])'