Skip to content

Commit fc388e7

Browse files
author
Jason Yellick
committed
FAB-11269 Improve configtx.yaml batch descriptions
The descriptions for the assorted batch size parameters in configtx.yaml are not as clear as they could be. This CR expands the descriptions, including what a batch is, and how it related to transactions and block sizes. This makes the issue #Done Change-Id: If90eb7e902445ba887b8be1508a6247c9ee46cb2 Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent f5e04a8 commit fc388e7

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

sampleconfig/configtx.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,22 +233,37 @@ Orderer: &OrdererDefaults
233233
BatchTimeout: 2s
234234

235235
# Batch Size: Controls the number of messages batched into a block.
236+
# The orderer views messages opaquely, but typically, messages may
237+
# be considered to be Fabric transactions. The 'batch' is the group
238+
# of messages in the 'data' field of the block. Blocks will be a few kb
239+
# larger than the batch size, when signatures, hashes, and other metadata
240+
# is applied.
236241
BatchSize:
237242

238243
# Max Message Count: The maximum number of messages to permit in a
239-
# batch.
244+
# batch. No block will contain more than this number of messages.
240245
MaxMessageCount: 10
241246

242247
# Absolute Max Bytes: The absolute maximum number of bytes allowed for
243-
# the serialized messages in a batch. If the "kafka" OrdererType is
248+
# the serialized messages in a batch. The maximum block size is this value
249+
# plus the size of the associated metadata (usually a few KB depending
250+
# upon the size of the signing identities). Any transaction larger than
251+
# this value will be rejected by ordering. If the "kafka" OrdererType is
244252
# selected, set 'message.max.bytes' and 'replica.fetch.max.bytes' on
245253
# the Kafka brokers to a value that is larger than this one.
246254
AbsoluteMaxBytes: 10 MB
247255

248256
# Preferred Max Bytes: The preferred maximum number of bytes allowed
249-
# for the serialized messages in a batch. A message larger than the
250-
# preferred max bytes will result in a batch larger than preferred max
251-
# bytes.
257+
# for the serialized messages in a batch. Roughly, this field may be considered
258+
# the best effort maximum size of a batch. A batch will fill with messages
259+
# until this size is reached (or the max message count, or batch timeout is
260+
# exceeded). If adding a new message to the batch would cause the batch to
261+
# exceed the preferred max bytes, then the current batch is closed and written
262+
# to a block, and a new batch containing the new message is created. If a
263+
# message larger than the preferred max bytes is received, then its batch
264+
# will contain only that message. Because messages may be larger than
265+
# preferred max bytes (up to AbsoluteMaxBytes), some batches may exceed
266+
# the preferred max bytes, but will always contain exactly one transaction.
252267
PreferredMaxBytes: 512 KB
253268

254269
# Max Channels is the maximum number of channels to allow on the ordering

0 commit comments

Comments
 (0)