Commit 8c736e77 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fa68b9e4
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package main package main
import ( import (
"../../storage" // XXX rel ok? _ "../../storage" // XXX rel ok?
) )
......
package proto package proto
// TODO .TID -> .Tid etc ? import (
. "../"
)
const ( const (
PROTOCOL_VERSION = 6 PROTOCOL_VERSION = 7
MIN_PACKET_SIZE = 10 // XXX link this to len(pkthead) ? MIN_PACKET_SIZE = 10 // XXX link this to len(pkthead) ?
MAX_PACKET_SIZE = 0x4000000 MAX_PACKET_SIZE = 0x4000000
...@@ -24,6 +26,7 @@ const ( ...@@ -24,6 +26,7 @@ const (
REPLICATION_ERROR REPLICATION_ERROR
CHECKING_ERROR CHECKING_ERROR
BACKEND_NOT_IMPLEMENTED BACKEND_NOT_IMPLEMENTED
READ_ONLY_ACCESS
) )
type ClusterState int type ClusterState int
...@@ -31,7 +34,7 @@ const ( ...@@ -31,7 +34,7 @@ const (
// NOTE cluster states descriptions is in protocol.py // NOTE cluster states descriptions is in protocol.py
RECOVERING ClusterState = iota RECOVERING ClusterState = iota
VERIFYING VERIFYING
RUNNING CLUSTER_RUNNING // XXX conflict with NodeState.RUNNING
STOPPING STOPPING
STARTING_BACKUP STARTING_BACKUP
BACKINGUP BACKINGUP
...@@ -79,10 +82,22 @@ type UUID int32 ...@@ -79,10 +82,22 @@ type UUID int32
// TODO UUID_NAMESPACES // TODO UUID_NAMESPACES
// XXX -> NodeInfo (and use []NodeInfo) ? type Address struct {
type NodeList []struct { Host string
Port uint16 // TODO if Host == 0 -> Port not added to wire (see py.PAddress)
}
// A SHA1 hash
type Checksum [20]byte
// Partition Table identifier
// Zero value means "invalid id" (<-> None in py.PPTID)
type PTid uint64 // XXX move to common place ?
// NOTE original NodeList = []NodeInfo
type NodeInfo struct {
NodeType NodeType
Address PAddress // TODO Address
UUID UUID
NodeState NodeState
} }
...@@ -142,10 +157,10 @@ type CloseClient struct { ...@@ -142,10 +157,10 @@ type CloseClient struct {
// connection. Any -> Any. // connection. Any -> Any.
type RequestIdentification struct { type RequestIdentification struct {
Packet Packet
ProtocolVersion PProtocol // TODO ProtocolVersion uint32 // TODO py.PProtocol upon decoding checks for != PROTOCOL_VERSION
NodeType NodeType // XXX name NodeType NodeType // XXX name
UUID UUID UUID UUID
Address PAddress // TODO Address
Name string Name string
} }
...@@ -157,9 +172,9 @@ type AcceptIdentification struct { ...@@ -157,9 +172,9 @@ type AcceptIdentification struct {
NumPartitions uint32 // PNumber NumPartitions uint32 // PNumber
NumReplicas uint32 // PNumber NumReplicas uint32 // PNumber
YourUUID UUID YourUUID UUID
Primary PAddress // TODO Primary Address // TODO
KnownMasterList []struct { KnownMasterList []struct {
Address PAddress Address
UUID UUID UUID UUID
} }
} }
...@@ -191,9 +206,9 @@ type Recovery struct { ...@@ -191,9 +206,9 @@ type Recovery struct {
type AnswerRecovery struct { type AnswerRecovery struct {
Packet Packet
PTID PPTID // TODO PTid
BackupTID TID BackupTID Tid
TruncateTID TID TruncateTID Tid
} }
// Ask the last OID/TID so that a master can initialize its TransactionManager. // Ask the last OID/TID so that a master can initialize its TransactionManager.
...@@ -204,8 +219,8 @@ type LastIDs struct { ...@@ -204,8 +219,8 @@ type LastIDs struct {
type AnswerLastIDs struct { type AnswerLastIDs struct {
Packet Packet
LastOID OID LastOID Oid
LastTID TID LastTID Tid
} }
// Ask the full partition table. PM -> S. // Ask the full partition table. PM -> S.
...@@ -216,7 +231,7 @@ type PartitionTable struct { ...@@ -216,7 +231,7 @@ type PartitionTable struct {
type AnswerPartitionTable struct { type AnswerPartitionTable struct {
Packet Packet
PTID PPTID // TODO PTid
RowList RowList RowList RowList
} }
...@@ -224,16 +239,16 @@ type AnswerPartitionTable struct { ...@@ -224,16 +239,16 @@ type AnswerPartitionTable struct {
// Send rows in a partition table to update other nodes. PM -> S, C. // Send rows in a partition table to update other nodes. PM -> S, C.
type NotifyPartitionTable struct { type NotifyPartitionTable struct {
Packet Packet
PTID PPTID // TODO PTid
RowList RowList RowList RowList
} }
// Notify a subset of a partition table. This is used to notify changes. // Notify a subset of a partition table. This is used to notify changes.
// PM -> S, C. // PM -> S, C.
type PartitionChanges struct type PartitionChanges struct {
Packet Packet
PTID PPTID // TODO PTid
CellList []struct { CellList []struct {
// XXX does below correlate with Cell inside top-level CellList ? // XXX does below correlate with Cell inside top-level CellList ?
Offset uint32 // PNumber Offset uint32 // PNumber
...@@ -265,9 +280,9 @@ type UnfinishedTransactions struct { ...@@ -265,9 +280,9 @@ type UnfinishedTransactions struct {
type AnswerUnfinishedTransactions struct { type AnswerUnfinishedTransactions struct {
Packet Packet
MaxTID TID MaxTID Tid
TidList []struct{ TidList []struct{
UnfinishedTID TID UnfinishedTID Tid
} }
} }
...@@ -279,25 +294,25 @@ type LockedTransactions struct { ...@@ -279,25 +294,25 @@ type LockedTransactions struct {
type AnswerLockedTransactions struct { type AnswerLockedTransactions struct {
Packet Packet
TidDict map[TID]TID // ttid -> tid TidDict map[Tid]Tid // ttid -> tid
} }
// Return final tid if ttid has been committed. * -> S. C -> PM. // Return final tid if ttid has been committed. * -> S. C -> PM.
type FinalTID struct { type FinalTID struct {
Packet Packet
TTID TID TTID Tid
} }
type AnswerFinalTID struct { type AnswerFinalTID struct {
Packet Packet
TID TID Tid Tid
} }
// Commit a transaction. PM -> S. // Commit a transaction. PM -> S.
type ValidateTransaction struct { type ValidateTransaction struct {
Packet Packet
TTID TID TTID Tid
Tid TID Tid Tid
} }
...@@ -305,62 +320,62 @@ type ValidateTransaction struct { ...@@ -305,62 +320,62 @@ type ValidateTransaction struct {
// Answer when a transaction begin, give a TID if necessary. PM -> C. // Answer when a transaction begin, give a TID if necessary. PM -> C.
type BeginTransaction struct { type BeginTransaction struct {
Packet Packet
TID TID Tid Tid
} }
type AnswerBeginTransaction struct { type AnswerBeginTransaction struct {
Packet Packet
TID TID Tid Tid
} }
// Finish a transaction. C -> PM. // Finish a transaction. C -> PM.
// Answer when a transaction is finished. PM -> C. // Answer when a transaction is finished. PM -> C.
type FinishTransaction struct { type FinishTransaction struct {
Packet Packet
TID TID Tid Tid
OIDList []OID OIDList []Oid
CheckedList []OID CheckedList []Oid
} }
type AnswerFinishTransaction struct { type AnswerFinishTransaction struct {
Packet Packet
TTID TID TTID Tid
TID TID Tid Tid
} }
// Notify that a transaction blocking a replication is now finished // Notify that a transaction blocking a replication is now finished
// M -> S // M -> S
type NotifyTransactionFinished struct { type NotifyTransactionFinished struct {
Packet Packet
TTID TID TTID Tid
MaxTID TID MaxTID Tid
} }
// Lock information on a transaction. PM -> S. // Lock information on a transaction. PM -> S.
// Notify information on a transaction locked. S -> PM. // Notify information on a transaction locked. S -> PM.
type LockInformation struct { type LockInformation struct {
Packet Packet
Ttid TID Ttid Tid
Tid TID Tid Tid
} }
// XXX AnswerInformationLocked ? // XXX AnswerInformationLocked ?
type AnswerLockInformation struct { type AnswerLockInformation struct {
Ttid TID Ttid Tid
} }
// Invalidate objects. PM -> C. // Invalidate objects. PM -> C.
// XXX ask_finish_transaction ? // XXX ask_finish_transaction ?
type InvalidateObjects struct { type InvalidateObjects struct {
Packet Packet
TID TID Tid Tid
OidList []OID OidList []Oid
} }
// Unlock information on a transaction. PM -> S. // Unlock information on a transaction. PM -> S.
type UnlockInformation struct { type UnlockInformation struct {
Packet Packet
TTID TID TTID Tid
} }
// Ask new object IDs. C -> PM. // Ask new object IDs. C -> PM.
...@@ -373,7 +388,7 @@ type GenerateOIDs struct { ...@@ -373,7 +388,7 @@ type GenerateOIDs struct {
// XXX answer_new_oids ? // XXX answer_new_oids ?
type AnswerGenerateOIDs struct { type AnswerGenerateOIDs struct {
Packet Packet
OidList []OID OidList []Oid
} }
...@@ -385,38 +400,38 @@ type AnswerGenerateOIDs struct { ...@@ -385,38 +400,38 @@ type AnswerGenerateOIDs struct {
// node must not try to resolve the conflict. S -> C. // node must not try to resolve the conflict. S -> C.
type StoreObject struct { type StoreObject struct {
Packet Packet
OID OID Oid Oid
Serial TID Serial Tid
Compression bool Compression bool
Checksum PChecksum // TODO Checksum Checksum
Data []byte // XXX or string ? Data []byte // XXX or string ?
DataSerial TID DataSerial Tid
TID TID Tid Tid
Unlock bool Unlock bool
} }
type AnswerStoreObject struct { type AnswerStoreObject struct {
Packet Packet
Conflicting bool Conflicting bool
OID OID Oid Oid
Serial TID Serial Tid
} }
// Abort a transaction. C -> S, PM. // Abort a transaction. C -> S, PM.
type AbortTransaction struct { type AbortTransaction struct {
Packet Packet
TID TID Tid Tid
} }
// Ask to store a transaction. C -> S. // Ask to store a transaction. C -> S.
// Answer if transaction has been stored. S -> C. // Answer if transaction has been stored. S -> C.
type StoreTransaction struct { type StoreTransaction struct {
Packet Packet
TID TID Tid Tid
User string User string
Description string Description string
Extension string Extension string
OidList []OID OidList []Oid
// TODO _answer = PFEmpty // TODO _answer = PFEmpty
} }
...@@ -424,7 +439,7 @@ type StoreTransaction struct { ...@@ -424,7 +439,7 @@ type StoreTransaction struct {
// Answer if transaction has been stored. S -> C. // Answer if transaction has been stored. S -> C.
type VoteTransaction struct { type VoteTransaction struct {
Packet Packet
TID TID Tid Tid
// TODO _answer = PFEmpty // TODO _answer = PFEmpty
} }
...@@ -434,21 +449,21 @@ type VoteTransaction struct { ...@@ -434,21 +449,21 @@ type VoteTransaction struct {
// Answer the requested object. S -> C. // Answer the requested object. S -> C.
type GetObject struct { type GetObject struct {
Packet Packet
OID OID Oid Oid
Serial TID Serial Tid
TID TID Tid Tid
} }
// XXX answer_object ? // XXX answer_object ?
type AnswerGetObject struct { type AnswerGetObject struct {
Packet Packet
OID OID Oid Oid
SerialStart TID SerialStart Tid
SerialEnd TID SerialEnd Tid
Compression bool Compression bool
Checksum PChecksum Checksum Checksum
Data []byte // XXX or string ? Data []byte // XXX or string ?
DataSerial TID DataSerial Tid
} }
// Ask for TIDs between a range of offsets. The order of TIDs is descending, // Ask for TIDs between a range of offsets. The order of TIDs is descending,
...@@ -456,7 +471,7 @@ type AnswerGetObject struct { ...@@ -456,7 +471,7 @@ type AnswerGetObject struct {
// Answer the requested TIDs. S -> C. // Answer the requested TIDs. S -> C.
type TIDList struct { type TIDList struct {
Packet Packet
Fisrt uint64 // PIndex XXX this is TID actually ? First uint64 // PIndex XXX this is TID actually ? -> no it is offset in list
Last uint64 // PIndex ----//---- Last uint64 // PIndex ----//----
Partition uint32 // PNumber Partition uint32 // PNumber
} }
...@@ -464,7 +479,7 @@ type TIDList struct { ...@@ -464,7 +479,7 @@ type TIDList struct {
// XXX answer_tids ? // XXX answer_tids ?
type AnswerTIDList struct { type AnswerTIDList struct {
Packet Packet
TIDList []TID TIDList []Tid
} }
// Ask for length TIDs starting at min_tid. The order of TIDs is ascending. // Ask for length TIDs starting at min_tid. The order of TIDs is ascending.
...@@ -472,8 +487,8 @@ type AnswerTIDList struct { ...@@ -472,8 +487,8 @@ type AnswerTIDList struct {
// Answer the requested TIDs. S -> C // Answer the requested TIDs. S -> C
type TIDListFrom struct { type TIDListFrom struct {
Packet Packet
MinTID TID MinTID Tid
MaxTID TID MaxTID Tid
Length uint32 // PNumber Length uint32 // PNumber
Partition uint32 // PNumber Partition uint32 // PNumber
} }
...@@ -481,24 +496,24 @@ type TIDListFrom struct { ...@@ -481,24 +496,24 @@ type TIDListFrom struct {
// XXX answer_tids ? // XXX answer_tids ?
type AnswerTIDListFrom struct { type AnswerTIDListFrom struct {
Packet Packet
TidList []TID TidList []Tid
} }
// Ask information about a transaction. Any -> S. // Ask information about a transaction. Any -> S.
// Answer information (user, description) about a transaction. S -> Any. // Answer information (user, description) about a transaction. S -> Any.
type TransactionInformation struct { type TransactionInformation struct {
Packet Packet
TID TID Tid Tid
} }
type AnswerTransactionInformation struct { type AnswerTransactionInformation struct {
Packet Packet
TID TID Tid Tid
User string User string
Description string Description string
Extension string Extension string
Packed bool Packed bool
OidList []OID OidList []Oid
} }
// Ask history information for a given object. The order of serials is // Ask history information for a given object. The order of serials is
...@@ -506,16 +521,16 @@ type AnswerTransactionInformation struct { ...@@ -506,16 +521,16 @@ type AnswerTransactionInformation struct {
// Answer history information (serial, size) for an object. S -> C. // Answer history information (serial, size) for an object. S -> C.
type ObjectHistory struct { type ObjectHistory struct {
Packet Packet
OID OID Oid Oid
First uint64 // PIndex XXX this is actually TID First uint64 // PIndex XXX this is actually TID
Last uint64 // PIndex ----//---- Last uint64 // PIndex ----//----
} }
type AnswerObjectHistory struct { type AnswerObjectHistory struct {
Packet Packet
OID OID Oid Oid
HistoryList []struct { HistoryList []struct {
Serial TID Serial Tid
Size uint32 // PNumber Size uint32 // PNumber
} }
} }
...@@ -532,20 +547,20 @@ type PartitionList struct { ...@@ -532,20 +547,20 @@ type PartitionList struct {
type AnswerPartitionList struct { type AnswerPartitionList struct {
Packet Packet
PTID PTID PTid
RowList RowList RowList RowList
) }
// Ask information about nodes // Ask information about nodes
// Answer information about nodes // Answer information about nodes
type NodeList struct { type X_NodeList struct {
Packet Packet
NodeType NodeType
} }
type AnswerNodeList struct { type AnswerNodeList struct {
Packet Packet
NodeList NodeList []NodeInfo
} }
// Set the node state // Set the node state
...@@ -576,7 +591,7 @@ type TweakPartitionTable struct { ...@@ -576,7 +591,7 @@ type TweakPartitionTable struct {
// Notify information about one or more nodes. PM -> Any. // Notify information about one or more nodes. PM -> Any.
type NotifyNodeInformation struct { type NotifyNodeInformation struct {
Packet Packet
NodeList NodeList []NodeInfo
} }
// Ask node information // Ask node information
...@@ -601,7 +616,7 @@ type ClusterInformation struct { ...@@ -601,7 +616,7 @@ type ClusterInformation struct {
// Ask state of the cluster // Ask state of the cluster
// Answer state of the cluster // Answer state of the cluster
type ClusterState struct { type X_ClusterState struct { // XXX conflicts with ClusterState enum
Packet Packet
State ClusterState State ClusterState
} }
...@@ -623,18 +638,18 @@ type ClusterState struct { ...@@ -623,18 +638,18 @@ type ClusterState struct {
// S -> C // S -> C
type ObjectUndoSerial struct { type ObjectUndoSerial struct {
Packet Packet
TID TID Tid Tid
LTID TID LTID Tid
UndoneTID TID UndoneTID Tid
OidList []OID OidList []Oid
} }
// XXX answer_undo_transaction ? // XXX answer_undo_transaction ?
type AnswerObjectUndoSerial struct { type AnswerObjectUndoSerial struct {
Packet Packet
ObjectTIDDict map[OID]struct { ObjectTIDDict map[Oid]struct {
CurrentSerial TID CurrentSerial Tid
UndoSerial TID UndoSerial Tid
IsCurrent bool IsCurrent bool
} }
} }
...@@ -644,13 +659,13 @@ type AnswerObjectUndoSerial struct { ...@@ -644,13 +659,13 @@ type AnswerObjectUndoSerial struct {
// Answer whether a transaction holds the write lock for requested object. // Answer whether a transaction holds the write lock for requested object.
type HasLock struct { type HasLock struct {
Packet Packet
TID TID Tid Tid
OID OID Oid Oid
} }
type AnswerHasLock struct { type AnswerHasLock struct {
Packet Packet
OID OID Oid Oid
LockState LockState LockState LockState
} }
...@@ -663,16 +678,16 @@ type AnswerHasLock struct { ...@@ -663,16 +678,16 @@ type AnswerHasLock struct {
// is nothing to invalidate in any client's cache. // is nothing to invalidate in any client's cache.
type CheckCurrentSerial struct { type CheckCurrentSerial struct {
Packet Packet
TID TID Tid Tid
Serial TID Serial Tid
OID OID Oid Oid
} }
// XXX answer_store_object ? // XXX answer_store_object ?
type AnswerCheckCurrentSerial struct { type AnswerCheckCurrentSerial struct {
Conflicting bool Conflicting bool
OID OID Oid Oid
Serial TID Serial Tid
} }
// Request a pack at given TID. // Request a pack at given TID.
...@@ -683,7 +698,7 @@ type AnswerCheckCurrentSerial struct { ...@@ -683,7 +698,7 @@ type AnswerCheckCurrentSerial struct {
// M -> C // M -> C
type Pack struct { type Pack struct {
Packet Packet
TID TID Tid Tid
} }
type AnswerPack struct { type AnswerPack struct {
...@@ -697,8 +712,8 @@ type AnswerPack struct { ...@@ -697,8 +712,8 @@ type AnswerPack struct {
type CheckReplicas struct { type CheckReplicas struct {
Packet Packet
PartitionDict map[uint32/*PNumber*/]UUID // partition -> source PartitionDict map[uint32/*PNumber*/]UUID // partition -> source
MinTID TID MinTID Tid
MaxTID TID MaxTID Tid
// XXX _answer = Error // XXX _answer = Error
} }
...@@ -709,10 +724,10 @@ type CheckPartition struct { ...@@ -709,10 +724,10 @@ type CheckPartition struct {
Partition uint32 // PNumber Partition uint32 // PNumber
Source struct { Source struct {
UpstreamName string UpstreamName string
Address PAddress Address Address
} }
MinTID TID MinTID Tid
MaxTID TID MaxTID Tid
} }
...@@ -728,15 +743,15 @@ type CheckTIDRange struct { ...@@ -728,15 +743,15 @@ type CheckTIDRange struct {
Packet Packet
Partition uint32 // PNumber Partition uint32 // PNumber
Length uint32 // PNumber Length uint32 // PNumber
MinTID TID MinTID Tid
MaxTID TID MaxTID Tid
} }
type AnswerCheckTIDRange struct { type AnswerCheckTIDRange struct {
Packet Packet
Count uint32 // PNumber Count uint32 // PNumber
Checksum PChecksum // TODO Checksum Checksum
MaxTID TID MaxTID Tid
} }
// Ask some stats about a range of object history. // Ask some stats about a range of object history.
...@@ -751,17 +766,17 @@ type CheckSerialRange struct { ...@@ -751,17 +766,17 @@ type CheckSerialRange struct {
Packet Packet
Partition uint32 // PNumber Partition uint32 // PNumber
Length uint32 // PNumber Length uint32 // PNumber
MinTID TID MinTID Tid
MaxTID TID MaxTID Tid
MinOID OID MinOID Oid
} }
type AnswerCheckSerialRange struct { type AnswerCheckSerialRange struct {
Count uint32 // PNumber Count uint32 // PNumber
TidChecksum PChecksum TidChecksum Checksum
MaxTID TID MaxTID Tid
OidChecksum PChecksum OidChecksum Checksum
MaxOID OID MaxOID Oid
} }
// S -> M // S -> M
...@@ -782,7 +797,7 @@ type LastTransaction struct { ...@@ -782,7 +797,7 @@ type LastTransaction struct {
type AnswerLastTransaction struct { type AnswerLastTransaction struct {
Packet Packet
TID TID Tid Tid
} }
......
...@@ -3,8 +3,13 @@ ...@@ -3,8 +3,13 @@
// filestorage support XXX text // filestorage support XXX text
package storage package storage
import (
"os"
. "../"
)
type FileStorage struct { type FileStorage struct {
fd int f *os.File // XXX naming -> file ?
} }
// IStorage // IStorage
...@@ -36,32 +41,32 @@ type DataRec struct { ...@@ -36,32 +41,32 @@ type DataRec struct {
} }
func (TxnRecHead *rh) MarshalFS() []byte { func (rh *TxnRecHead) MarshalFS() []byte {
panic("TODO") panic("TODO")
} }
func (TxnRecHead *rh) UnmarshalFS(data []byte) { func (rh *TxnRecHead) UnmarshalFS(data []byte) {
TODO //TODO
} }
func NewFileStorage(path string) (*FileStorage, error) { func NewFileStorage(path string) (*FileStorage, error) {
fd, err := ...Open(path, O_RDONLY) f, err := os.Open(path) // note opens in O_RDONLY
if err != nil { if err != nil {
return nil, err return nil, err
} }
// TODO read file header // TODO read file header
Read(fd, 4) != "FS21" -> invalid header //Read(f, 4) != "FS21" -> invalid header
return &FileStorage{fd: fd} return &FileStorage{f: f}, nil
} }
func (f *FileStorage) Close() error { func (f *FileStorage) Close() error {
err := Os.Close(f.fd) err := f.f.Close()
if err != nil { if err != nil {
return err return err
} }
f.fd = -1 f.f = nil
return nil return nil
} }
...@@ -70,5 +75,6 @@ func (f *FileStorage) Iterate(start, stop Tid) IStorageIterator { ...@@ -70,5 +75,6 @@ func (f *FileStorage) Iterate(start, stop Tid) IStorageIterator {
panic("TODO start/stop support") panic("TODO start/stop support")
} }
// TODO
return nil
} }
...@@ -18,10 +18,13 @@ const ( ...@@ -18,10 +18,13 @@ const (
INVALID_TID Tid = 1<<64 - 1 // 0xffffffffffffffff TODO recheck it is the same INVALID_TID Tid = 1<<64 - 1 // 0xffffffffffffffff TODO recheck it is the same
INVALID_OID Oid = 0xffffffffffffffff // 1<<64 - 1 INVALID_OID Oid = 0xffffffffffffffff // 1<<64 - 1
ZERO_TID Tid = 0 // XXX or simply TID{} ? // XXX -> TID0 ? ZERO_TID Tid = 0 // XXX or simply TID{} ? // XXX -> TID0 ?
TID0 Tid = ZERO_TID // XXX ^^^ choose 1
ZERO_OID Oid = 0 // XXX or simply OID{} ? // XXX -> OID0 ZERO_OID Oid = 0 // XXX or simply OID{} ? // XXX -> OID0
// OID_LEN = 8 // OID_LEN = 8
// TID_LEN = 8 // TID_LEN = 8
MAX_TID Tid = 0x7fffffffffffffff // SQLite does not accept numbers above 2^63-1 // XXX -> TIDMAX ? MAX_TID Tid = 0x7fffffffffffffff // SQLite does not accept numbers above 2^63-1 // XXX -> TIDMAX ?
TIDMAX Tid = MAX_TID // XXX ^^^ choose 1
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment