The FLAGS metadata field

The FLAGS metadata field is a collection of individual boolean flags, each of which has a unique name. Similar to metadata fields, some flags can be modified, but not others.

Some users require a binary mapping of bit values to message flags. The listed message flags are the externally visible bit values that are visible through Tcl.

For example, this is useful in writing a Tcl script to convert old format SMAT files without metadata to the new style that has metadata. msgmetaset does not work because there is no message handle. Knowing the flag names does not work.

Therefore, the list of Tcl flag names describes the binary position of each external message flag, so that you can construct the FLAGS field.

External message flags bit masks:

  • should_be_freed

    Used by internal memory management.

    Bit Value: 0x00000001

    Tcl Writable: FALSE

  • icl_owns_data

    Whether the local copy of the message can be destroyed if sent to a thread in another process.

    Bit Value: 0x00000002

    Tcl Writable: FALSE

  • expect_reply

    Automatically set when the thread is configured to await replies. When set, the threads await a reply after writing the message through the protocol connection.

    Bit Value: 0x00000004

    Tcl Writable: TRUE

  • is_forwarded

    Set if the message is ever forwarded from one thread to another.

    Bit Value: 0x00000008

    Tcl Writable: FALSE

  • is_enqueued

    TRUE when MSG is on a queue; otherwise, FALSE.

    Bit Value: 0x00000010

    Tcl Writable: FALSE

  • last_in_group

    Set to indicate that this message is the last in a related group.

    Bit Value: 0x00000020

    Tcl Writable: TRUE

  • proto_timeout

    Set by the protocol driver to describe a protocol-send failure due to time-out. Intended for use by SENDFAIL TPS procedures.

    Bit Value: 0x00000040

    Tcl Writable: TRUE

  • proto_nak

    Set by the protocol driver to describe a protocol-send failure due to nak. Intended for use by SENDFAIL TPS procedures.

    Bit Value: 0x00000080

    Tcl Writable: TRUE

  • is_resent

    Set if this message was resent back into the engine.

    Bit Value: 0x00000200

    Tcl Writable: TRUE

  • recovered

    Recovers the message from the database.

    Bit Value: 0x00000800

    Tcl Writable: TRUE

  • is_on_disk

    Bit Value: 0x00001000

    Tcl Writable: FALSE

  • keep_on_disk

    Bit Value: 0x00002000

    Tcl Writable: FALSE

  • use_rdb

    Set to indicate that this message goes to the recovery database if there is an engine failure.

    Bit Value: 0x00008000

    Tcl Writable: FALSE

  • prewrite_done

    Set if this message has a prewrite procedure.

    Bit Value: 0x00010000

    Tcl Writable: FALSE

msgdump displays the flags as a hexadecimal value. When the FLAGS metadata field is retrieved, msgmetaget returns the list of enabled flags.