Skip to content

Use batch writes from Fabric 3.1 #645

@dzikowski

Description

@dzikowski

In the method .flushWrites() which is called at the end of the transaction use batch writes which are supported from Fabric 3.1. They can be used for other versions, it just has no effect. As documented in the Fabric source code in interfaces.go:

	// StartWriteBatch enables a mode where all changes are not immediately forwarded to the peer,
	// but accumulate in the cache. The cache is sent in large batches either at the end of transaction
	// execution or after the FinishWriteBatch call.
	// IMPORTANT: in this mode, the expected order of transaction execution and expected errors can be changed.
	//
	// If write batching is not supported by the peer, this method has no effect
	// and writes to the ledger continue to be processed immediately.
	StartWriteBatch()

	// FinishWriteBatch sends accumulated changes in large batches to the peer
	// if StartWriteBatch has been called before it.
	//
	// If write batching is not supported by the peer or no write batch has been
	// started, this method has no effect and returns nil.
	FinishWriteBatch() error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions