Skip to content

Commit

Permalink
[FAB-1933] ExecuteQuery on leveldb panic
Browse files Browse the repository at this point in the history
ExecuteQuery() is not supported on leveldb state
database.  Currently if called it will panic the peer.
This changeset changes it to a normal error
so that it does not kill the peer process.

Change-Id: Ib9f525524c99b107b4fc3935f2d38a5657bace73
Signed-off-by: denyeart <enyeart@us.ibm.com>
  • Loading branch information
denyeart committed Jan 30, 2017
1 parent 1db74eb commit 6255f8d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package stateleveldb

import (
"bytes"
"errors"
"fmt"

"github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb"
Expand Down Expand Up @@ -122,7 +123,7 @@ func (vdb *versionedDB) GetStateRangeScanIterator(namespace string, startKey str

// ExecuteQuery implements method in VersionedDB interface
func (vdb *versionedDB) ExecuteQuery(query string) (statedb.ResultsIterator, error) {
panic("Method not supported for leveldb")
return nil, errors.New("ExecuteQuery not supported for leveldb")
}

// ApplyUpdates implements method in VersionedDB interface
Expand Down

0 comments on commit 6255f8d

Please sign in to comment.