github.com/matrixorigin/matrixone@v1.2.0/proto/timestamp.proto (about)

     1  /* 
     2   * Copyright 2021 Matrix Origin
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *      http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  syntax = "proto3";
    18  package timestamp;
    19  option go_package = "github.com/matrixorigin/matrixone/pkg/pb/timestamp";
    20  
    21  // Timestamp is a HLC time value. All its field should never be accessed
    22  // directly by its users. 
    23  message Timestamp {
    24    // PhysicalTime is the physical component of the HLC, it is read from a node's
    25    // wall clock time as Unix epoch time in nanoseconds. HLC requires this field
    26    // to be monotonically increase on each node.
    27    int64  PhysicalTime = 1;
    28    // LogicalTime is the logical component of the HLC, its value is maintained
    29    // according to the HLC algorithm. The HLC paper further establishes that its
    30    // value will not overflow in a real production environment. 
    31    uint32 LogicalTime  = 2;
    32    // NodeID just used to compatible with TAE some constraint to guaranteed unique 
    33    // timestamp. uint16 is not defined, so use uint32, but only 2 bytes. The field 
    34    // is not used for comparing the timestamps.
    35    uint32 NodeID       = 3;
    36  }