Repository: yorkie-team/yorkie
Pull request #381 (2022-08-05 11:17:21)

Chromato99 change data type
<!--  Thanks for sending a pull request! -->

**What this PR does / why we need it**:

This has resolved the conflict of #379.

**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note

```

**Additional documentation**:

<!--
This section can be blank if this pull request does not require a release note.

Please use the following format for linking documentation:
- [Usage]: <link>
- [Other doc]: <link>
-->
```docs

```

**Checklist**:
- [ ] Added relevant tests or not required
- [ ] Didn't break anything


codecov[bot]: # [Codecov](https://codecov.io/gh/yorkie-team/yorkie/pull/381?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team) Report
> Merging [#381](https://codecov.io/gh/yorkie-team/yorkie/pull/381?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team) (effdc0e) into [main](https://codecov.io/gh/yorkie-team/yorkie/commit/9a7bacb89a9662119947bce8d1d90ecb23d64ce2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team) (9a7bacb) will **not change** coverage.
> The diff coverage is `83.33%`.

```diff
@@           Coverage Diff           @@
##             main     #381   +/-   ##
=======================================
  Coverage   47.22%   47.22%           
=======================================
  Files          68       68           
  Lines        5741     5741           
=======================================
  Hits         2711     2711           
  Misses       2734     2734           
  Partials      296      296           
```


| [Impacted Files](https://codecov.io/gh/yorkie-team/yorkie/pull/381?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team) | Coverage Δ | |
|---|---|---|
| [pkg/document/change/change.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-cGtnL2RvY3VtZW50L2NoYW5nZS9jaGFuZ2UuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/document/change/checkpoint.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-cGtnL2RvY3VtZW50L2NoYW5nZS9jaGVja3BvaW50Lmdv) | `92.00% <ø> (ø)` | |
| [pkg/document/change/id.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-cGtnL2RvY3VtZW50L2NoYW5nZS9pZC5nbw==) | `25.00% <ø> (ø)` | |
| [pkg/document/internal\_document.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-cGtnL2RvY3VtZW50L2ludGVybmFsX2RvY3VtZW50Lmdv) | `22.03% <ø> (ø)` | |
| [server/backend/config.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-c2VydmVyL2JhY2tlbmQvY29uZmlnLmdv) | `61.29% <ø> (ø)` | |
| [server/backend/database/change\_info.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-c2VydmVyL2JhY2tlbmQvZGF0YWJhc2UvY2hhbmdlX2luZm8uZ28=) | `29.16% <ø> (ø)` | |
| [server/backend/database/client\_info.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-c2VydmVyL2JhY2tlbmQvZGF0YWJhc2UvY2xpZW50X2luZm8uZ28=) | `35.59% <ø> (ø)` | |
| [server/backend/database/doc\_info.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-c2VydmVyL2JhY2tlbmQvZGF0YWJhc2UvZG9jX2luZm8uZ28=) | `0.00% <ø> (ø)` | |
| [server/backend/database/memory/database.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-c2VydmVyL2JhY2tlbmQvZGF0YWJhc2UvbWVtb3J5L2RhdGFiYXNlLmdv) | `46.87% <0.00%> (ø)` | |
| [server/backend/database/mongo/client.go](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team#diff-c2VydmVyL2JhY2tlbmQvZGF0YWJhc2UvbW9uZ28vY2xpZW50Lmdv) | `7.76% <ø> (ø)` | |
| ... and [2 more](https://codecov.io/gh/yorkie-team/yorkie/pull/381/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team) | |

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yorkie-team)


Patch:
diff --git a/admin/client.go b/admin/client.go
index bfe39ffa..5b1e295d 100644
--- a/admin/client.go
+++ b/admin/client.go
@@ -230,7 +230,7 @@ func (c *Client) ListChangeSummaries(
 	ctx context.Context,
 	projectName string,
 	key key.Key,
-	previousSeq uint64,
+	previousSeq int64,
 	pageSize int32,
 	isForward bool,
 ) ([]*types.ChangeSummary, error) {
@@ -252,7 +252,7 @@ func (c *Client) ListChangeSummaries(
 	}
 
 	lastSeq := changes[len(changes)-1].ID().ServerSeq()
-	from, _ := types.GetChangesRange(types.Paging[uint64]{
+	from, _ := types.GetChangesRange(types.Paging[int64]{
 		Offset:    previousSeq,
 		PageSize:  int(pageSize),
 		IsForward: isForward,
diff --git a/api/admin.pb.go b/api/admin.pb.go
index 74d34cc9..c171fa6b 100644
--- a/api/admin.pb.go
+++ b/api/admin.pb.go
@@ -829,7 +829,7 @@ func (m *GetDocumentResponse) GetDocument() *DocumentSummary {
 type GetSnapshotMetaRequest struct {
 	ProjectName          string   `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"`
 	DocumentKey          string   `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"`
-	ServerSeq            uint64   `protobuf:"varint,3,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"`
+	ServerSeq            int64    `protobuf:"varint,3,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
@@ -882,7 +882,7 @@ func (m *GetSnapshotMetaRequest) GetDocumentKey() string {
 	return ""
 }
 
-func (m *GetSnapshotMetaRequest) GetServerSeq() uint64 {
+func (m *GetSnapshotMetaRequest) GetServerSeq() int64 {
 	if m != nil {
 		return m.ServerSeq
 	}
@@ -891,7 +891,7 @@ func (m *GetSnapshotMetaRequest) GetServerSeq() uint64 {
 
 type GetSnapshotMetaResponse struct {
 	Snapshot             []byte   `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
-	Lamport              uint64   `protobuf:"varint,2,opt,name=lamport,proto3" json:"lamport,omitempty"`
+	Lamport              int64    `protobuf:"varint,2,opt,name=lamport,proto3" json:"lamport,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
@@ -937,7 +937,7 @@ func (m *GetSnapshotMetaResponse) GetSnapshot() []byte {
 	return nil
 }
 
-func (m *GetSnapshotMetaResponse) GetLamport() uint64 {
+func (m *GetSnapshotMetaResponse) GetLamport() int64 {
 	if m != nil {
 		return m.Lamport
 	}
@@ -1065,7 +1065,7 @@ func (m *SearchDocumentsResponse) GetDocuments() []*DocumentSummary {
 type ListChangesRequest struct {
 	ProjectName          string   `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"`
 	DocumentKey          string   `protobuf:"bytes,2,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"`
-	PreviousSeq          uint64   `protobuf:"varint,3,opt,name=previous_seq,json=previousSeq,proto3" json:"previous_seq,omitempty"`
+	PreviousSeq          int64    `protobuf:"varint,3,opt,name=previous_seq,json=previousSeq,proto3" json:"previous_seq,omitempty"`
 	PageSize             int32    `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
 	IsForward            bool     `protobuf:"varint,5,opt,name=is_forward,json=isForward,proto3" json:"is_forward,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -1120,7 +1120,7 @@ func (m *ListChangesRequest) GetDocumentKey() string {
 	return ""
 }
 
-func (m *ListChangesRequest) GetPreviousSeq() uint64 {
+func (m *ListChangesRequest) GetPreviousSeq() int64 {
 	if m != nil {
 		return m.PreviousSeq
 	}
@@ -1216,62 +1216,62 @@ func init() {
 func init() { proto.RegisterFile("admin.proto", fileDescriptor_73a7fc70dcc2027c) }
 
 var fileDescriptor_73a7fc70dcc2027c = []byte{
-	// 876 bytes of a gzipped FileDescriptorProto
+	// 877 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
-	0x10, 0x36, 0x65, 0x31, 0x96, 0x86, 0x72, 0xd2, 0xac, 0x65, 0x9b, 0xa1, 0x53, 0x45, 0x5e, 0xc0,
+	0x10, 0x36, 0x25, 0x31, 0x96, 0x86, 0x72, 0xd2, 0xac, 0x65, 0x9b, 0xa1, 0x53, 0x45, 0x5e, 0xc0,
 	0xad, 0xd0, 0x83, 0x6b, 0x28, 0xd7, 0x00, 0x69, 0xed, 0xd6, 0x6a, 0x90, 0x34, 0x28, 0x48, 0xf8,
 	0xd2, 0x1e, 0x84, 0x8d, 0xb8, 0x91, 0xd9, 0x48, 0x24, 0xb5, 0x4b, 0x26, 0x70, 0x6e, 0x7d, 0x89,
 	0xa2, 0x2f, 0xd3, 0x7b, 0x8f, 0x7d, 0x84, 0xc2, 0x7d, 0x8d, 0x1e, 0x0a, 0xee, 0x0f, 0xcd, 0xbf,
-	0x06, 0x76, 0xe3, 0x9b, 0xf8, 0xcd, 0xec, 0x37, 0xf3, 0xed, 0xce, 0x8f, 0xc0, 0x22, 0xfe, 0x32,
-	0x08, 0x0f, 0x63, 0x16, 0x25, 0x11, 0x5a, 0x27, 0x71, 0xe0, 0xdc, 0x63, 0x94, 0x47, 0x29, 0x9b,
-	0x51, 0x2e, 0x51, 0x3c, 0x81, 0x4d, 0x2f, 0x98, 0x87, 0x67, 0xb1, 0x4b, 0x57, 0x29, 0xe5, 0x09,
-	0x72, 0xa0, 0x93, 0x72, 0xca, 0x42, 0xb2, 0xa4, 0xb6, 0x31, 0x34, 0x46, 0x5d, 0x37, 0xff, 0xce,
-	0x6c, 0x31, 0xe1, 0xfc, 0x5d, 0xc4, 0x7c, 0xbb, 0x25, 0x6d, 0xfa, 0x1b, 0x7f, 0x09, 0x77, 0x35,
-	0x11, 0x8f, 0xa3, 0x90, 0x53, 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 0x63, 0x91, 0xaf, 0xd2, 0xd8,
+	0x8a, 0xaf, 0x79, 0xbc, 0x28, 0xbe, 0xff, 0x98, 0x05, 0x52, 0x63, 0xa1, 0xf0, 0x95, 0xc6, 0x7a,
+	0x27, 0x3b, 0x76, 0xdd, 0xa0, 0x39, 0x4e, 0x3e, 0xf9, 0xe3, 0x6a, 0x68, 0xfc, 0x79, 0x35, 0x34,
+	0xfe, 0xba, 0x1a, 0x1a, 0xbf, 0xfd, 0x3d, 0xdc, 0x78, 0x71, 0x4b, 0xfc, 0x1b, 0x7c, 0xf8, 0x6f,
+	0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0xe9, 0x6f, 0x1e, 0x32, 0x0a, 0x00, 0x00,
 }
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -4686,7 +4686,7 @@ func (m *GetSnapshotMetaRequest) Unmarshal(dAtA []byte) error {
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.ServerSeq |= uint64(b&0x7F) << shift
+				m.ServerSeq |= int64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
@@ -4790,7 +4790,7 @@ func (m *GetSnapshotMetaResponse) Unmarshal(dAtA []byte) error {
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.Lamport |= uint64(b&0x7F) << shift
+				m.Lamport |= int64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
@@ -5162,7 +5162,7 @@ func (m *ListChangesRequest) Unmarshal(dAtA []byte) error {
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.PreviousSeq |= uint64(b&0x7F) << shift
+				m.PreviousSeq |= int64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
diff --git a/api/admin.proto b/api/admin.proto
index b23bd6d3..b531bdb3 100644
--- a/api/admin.proto
+++ b/api/admin.proto
@@ -109,12 +109,12 @@ message GetDocumentResponse {
 message GetSnapshotMetaRequest {
   string project_name = 1;
   string document_key = 2;
-  uint64 server_seq = 3  [jstype = JS_STRING];
+  int64 server_seq = 3  [jstype = JS_STRING];
 }
 
 message GetSnapshotMetaResponse {
   bytes snapshot = 1;
-  uint64 lamport = 2  [jstype = JS_STRING];
+  int64 lamport = 2  [jstype = JS_STRING];
 }
 
 message SearchDocumentsRequest {
@@ -131,11 +131,11 @@ message SearchDocumentsResponse {
 message ListChangesRequest {
   string project_name = 1;
   string document_key = 2;
-  uint64 previous_seq = 3  [jstype = JS_STRING];
+  int64 previous_seq = 3  [jstype = JS_STRING];
   int32  page_size = 4; 
   bool   is_forward = 5;
 }
 
 message ListChangesResponse {
   repeated Change changes = 1;
-}
\ No newline at end of file
+}
diff --git a/api/resources.pb.go b/api/resources.pb.go
index fe36cc86..b2016641 100644
--- a/api/resources.pb.go
+++ b/api/resources.pb.go
@@ -262,8 +262,8 @@ func (m *Change) GetOperations() []*Operation {
 
 type ChangeID struct {
 	ClientSeq            uint32   `protobuf:"varint,1,opt,name=client_seq,json=clientSeq,proto3" json:"client_seq,omitempty"`
-	ServerSeq            uint64   `protobuf:"varint,2,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"`
-	Lamport              uint64   `protobuf:"varint,3,opt,name=lamport,proto3" json:"lamport,omitempty"`
+	ServerSeq            int64    `protobuf:"varint,2,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"`
+	Lamport              int64    `protobuf:"varint,3,opt,name=lamport,proto3" json:"lamport,omitempty"`
 	ActorId              []byte   `protobuf:"bytes,4,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
@@ -310,14 +310,14 @@ func (m *ChangeID) GetClientSeq() uint32 {
 	return 0
 }
 
-func (m *ChangeID) GetServerSeq() uint64 {
+func (m *ChangeID) GetServerSeq() int64 {
 	if m != nil {
 		return m.ServerSeq
 	}
 	return 0
 }
 
-func (m *ChangeID) GetLamport() uint64 {
+func (m *ChangeID) GetLamport() int64 {
 	if m != nil {
 		return m.Lamport
 	}
@@ -2745,7 +2745,7 @@ func (m *Clients) GetClients() []*Client {
 }
 
 type Checkpoint struct {
-	ServerSeq            uint64   `protobuf:"varint,1,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"`
+	ServerSeq            int64    `protobuf:"varint,1,opt,name=server_seq,json=serverSeq,proto3" json:"server_seq,omitempty"`
 	ClientSeq            uint32   `protobuf:"varint,2,opt,name=client_seq,json=clientSeq,proto3" json:"client_seq,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
@@ -2785,7 +2785,7 @@ func (m *Checkpoint) XXX_DiscardUnknown() {
 
 var xxx_messageInfo_Checkpoint proto.InternalMessageInfo
 
-func (m *Checkpoint) GetServerSeq() uint64 {
+func (m *Checkpoint) GetServerSeq() int64 {
 	if m != nil {
 		return m.ServerSeq
 	}
@@ -2863,7 +2863,7 @@ func (m *TextNodePos) GetRelativeOffset() int32 {
 }
 
 type TimeTicket struct {
-	Lamport              uint64   `protobuf:"varint,1,opt,name=lamport,proto3" json:"lamport,omitempty"`
+	Lamport              int64    `protobuf:"varint,1,opt,name=lamport,proto3" json:"lamport,omitempty"`
 	Delimiter            uint32   `protobuf:"varint,2,opt,name=delimiter,proto3" json:"delimiter,omitempty"`
 	ActorId              []byte   `protobuf:"bytes,3,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -2904,7 +2904,7 @@ func (m *TimeTicket) XXX_DiscardUnknown() {
 
 var xxx_messageInfo_TimeTicket proto.InternalMessageInfo
 
-func (m *TimeTicket) GetLamport() uint64 {
+func (m *TimeTicket) GetLamport() int64 {
 	if m != nil {
 		return m.Lamport
 	}
@@ -3066,120 +3066,120 @@ var fileDescriptor_cf1b13971fe4c19d = []byte{
 	0x8b, 0x3d, 0x3d, 0xb0, 0x1c, 0xdb, 0x2f, 0xa5, 0xa9, 0xa5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, 0xd6, 0xde, 0x6d, 0x36, 0x94, 0x54, 0x7c, 0xfa, 0x69, 0xad, 0x57, 0x6f, 0x35, 0x1b,
+	0x8a, 0x80, 0x6e, 0xc2, 0xd5, 0xe9, 0xf4, 0x61, 0x3b, 0x24, 0x88, 0xe8, 0x1a, 0x28, 0x07, 0x6a,
+	0xb3, 0xdb, 0x6c, 0xd7, 0x9b, 0x13, 0x29, 0xe9, 0x1d, 0xe5, 0xcb, 0x57, 0xeb, 0xc2, 0xdf, 0x5f,
+	0xad, 0x0b, 0x5f, 0xbf, 0x5a, 0x17, 0x7e, 0xff, 0x9f, 0xf5, 0x54, 0x3f, 0x4b, 0x0b, 0xc5, 0xf7,
+	0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x25, 0x00, 0x49, 0xa1, 0x1f, 0x00, 0x00,
 }
 
 func (m *ChangePack) Marshal() (dAtA []byte, err error) {
@@ -7757,7 +7757,7 @@ func (m *ChangeID) Unmarshal(dAtA []byte) error {
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.ServerSeq |= uint64(b&0x7F) << shift
+				m.ServerSeq |= int64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
@@ -7776,7 +7776,7 @@ func (m *ChangeID) Unmarshal(dAtA []byte) error {
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.Lamport |= uint64(b&0x7F) << shift
+				m.Lamport |= int64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
@@ -14546,7 +14546,7 @@ func (m *Checkpoint) Unmarshal(dAtA []byte) error {
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.ServerSeq |= uint64(b&0x7F) << shift
+				m.ServerSeq |= int64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
@@ -14760,7 +14760,7 @@ func (m *TimeTicket) Unmarshal(dAtA []byte) error {
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.Lamport |= uint64(b&0x7F) << shift
+				m.Lamport |= int64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
diff --git a/api/resources.proto b/api/resources.proto
index 62f6a3af..0e4084e6 100644
--- a/api/resources.proto
+++ b/api/resources.proto
@@ -40,8 +40,8 @@ message Change {
 
 message ChangeID {
   uint32 client_seq = 1;
-  uint64 server_seq = 2 [jstype = JS_STRING];
-  uint64 lamport = 3 [jstype = JS_STRING];
+  int64 server_seq = 2 [jstype = JS_STRING];
+  int64 lamport = 3 [jstype = JS_STRING];
   bytes actor_id = 4;
 }
 
@@ -271,7 +271,7 @@ message Clients {
 }
 
 message Checkpoint {
-  uint64 server_seq = 1 [jstype = JS_STRING];
+  int64 server_seq = 1 [jstype = JS_STRING];
   uint32 client_seq = 2;
 }
 
@@ -282,7 +282,7 @@ message TextNodePos {
 }
 
 message TimeTicket {
-  uint64 lamport = 1 [jstype = JS_STRING];
+  int64 lamport = 1 [jstype = JS_STRING];
   uint32 delimiter = 2;
   bytes actor_id = 3;
 }
diff --git a/api/types/change_summary.go b/api/types/change_summary.go
index fc1d4c0a..9e043068 100644
--- a/api/types/change_summary.go
+++ b/api/types/change_summary.go
@@ -16,16 +16,16 @@ type ChangeSummary struct {
 
 // GetChangesRange returns a range of changes.
 func GetChangesRange(
-	paging Paging[uint64],
-	lastSeq uint64,
-) (uint64, uint64) {
+	paging Paging[int64],
+	lastSeq int64,
+) (int64, int64) {
 	if paging.Offset == 0 && paging.PageSize == 0 {
 		return 1, lastSeq
 	}
 
-	size := uint64(paging.PageSize)
+	size := int64(paging.PageSize)
 	prevSeq := paging.Offset
-	var from, to uint64
+	var from, to int64
 	if paging.IsForward {
 		if prevSeq == 0 {
 			from = 1
diff --git a/cmd/yorkie/history.go b/cmd/yorkie/history.go
index 9337d471..39ad70be 100644
--- a/cmd/yorkie/history.go
+++ b/cmd/yorkie/history.go
@@ -29,7 +29,7 @@ import (
 )
 
 var (
-	previousSeq uint64
+	previousSeq int64
 	pageSize    int32
 	isForward   bool
 )
@@ -90,7 +90,7 @@ func newHistoryCmd() *cobra.Command {
 
 func init() {
 	cmd := newHistoryCmd()
-	cmd.Flags().Uint64Var(
+	cmd.Flags().Int64Var(
 		&previousSeq,
 		"previous-seq",
 		0,
diff --git a/cmd/yorkie/server.go b/cmd/yorkie/server.go
index a604d43f..03a43a59 100644
--- a/cmd/yorkie/server.go
+++ b/cmd/yorkie/server.go
@@ -295,14 +295,14 @@ func init() {
 		"Whether to use the default project. Even if public key is not provided from the client, "+
 			"the default project will be used for the request.",
 	)
-	cmd.Flags().Uint64Var(
+	cmd.Flags().Int64Var(
 		&conf.Backend.SnapshotThreshold,
 		"backend-snapshot-threshold",
 		server.DefaultSnapshotThreshold,
 		"Threshold that determines if changes should be sent with snapshot when the number "+
 			"of changes is greater than this value.",
 	)
-	cmd.Flags().Uint64Var(
+	cmd.Flags().Int64Var(
 		&conf.Backend.SnapshotInterval,
 		"backend-snapshot-interval",
 		server.DefaultSnapshotInterval,
diff --git a/pkg/document/change/change.go b/pkg/document/change/change.go
index 4da6f740..d156303b 100644
--- a/pkg/document/change/change.go
+++ b/pkg/document/change/change.go
@@ -69,7 +69,7 @@ func (c *Change) Operations() []operations.Operation {
 }
 
 // ServerSeq returns the serverSeq of this change.
-func (c *Change) ServerSeq() uint64 {
+func (c *Change) ServerSeq() int64 {
 	return c.id.ServerSeq()
 }
 
@@ -79,7 +79,7 @@ func (c *Change) ClientSeq() uint32 {
 }
 
 // SetServerSeq sets the given serverSeq.
-func (c *Change) SetServerSeq(serverSeq uint64) {
+func (c *Change) SetServerSeq(serverSeq int64) {
 	c.id = c.id.SetServerSeq(serverSeq)
 }
 
diff --git a/pkg/document/change/checkpoint.go b/pkg/document/change/checkpoint.go
index fc8abe55..6fe51d62 100644
--- a/pkg/document/change/checkpoint.go
+++ b/pkg/document/change/checkpoint.go
@@ -33,7 +33,7 @@ const (
 var InitialCheckpoint = NewCheckpoint(InitialServerSeq, InitialClientSeq)
 
 // MaxCheckpoint is the maximum value of Checkpoint.
-var MaxCheckpoint = NewCheckpoint(math.MaxUint64, math.MaxUint32)
+var MaxCheckpoint = NewCheckpoint(math.MaxInt64, math.MaxUint32)
 
 // Checkpoint is used to determine the client received changes.
 // It is not meant to be used to determine the logical order of changes.
@@ -41,7 +41,7 @@ type Checkpoint struct {
 	// serverSeq is the sequence of the change on the server. We can find the
 	// change with serverSeq and documentID in the server. If the change is not
 	// stored on the server, serverSeq is 0.
-	ServerSeq uint64
+	ServerSeq int64
 
 	// clientSeq is the sequence of the change within the client that made the
 	// change.
@@ -49,7 +49,7 @@ type Checkpoint struct {
 }
 
 // NewCheckpoint creates a new instance of Checkpoint.
-func NewCheckpoint(serverSeq uint64, clientSeq uint32) Checkpoint {
+func NewCheckpoint(serverSeq int64, clientSeq uint32) Checkpoint {
 	return Checkpoint{
 		ServerSeq: serverSeq,
 		ClientSeq: clientSeq,
@@ -57,7 +57,7 @@ func NewCheckpoint(serverSeq uint64, clientSeq uint32) Checkpoint {
 }
 
 // NextServerSeq creates a new instance with next server sequence.
-func (cp Checkpoint) NextServerSeq(serverSeq uint64) Checkpoint {
+func (cp Checkpoint) NextServerSeq(serverSeq int64) Checkpoint {
 	if cp.ServerSeq == serverSeq {
 		return cp
 	}
diff --git a/pkg/document/change/id.go b/pkg/document/change/id.go
index dc0ef64e..cc64acf1 100644
--- a/pkg/document/change/id.go
+++ b/pkg/document/change/id.go
@@ -40,10 +40,10 @@ type ID struct {
 	// serverSeq is the sequence of the change on the server. We can find the
 	// change with serverSeq and documentID in the server. If the change is not
 	// stored on the server, serverSeq is 0.
-	serverSeq uint64
+	serverSeq int64
 
 	// lamport is lamport timestamp.
-	lamport uint64
+	lamport int64
 
 	// actorID is actorID of this ID. If the actor is not set, it has initial
 	// value.
@@ -53,8 +53,8 @@ type ID struct {
 // NewID creates a new instance of ID.
 func NewID(
 	clientSeq uint32,
-	serverSeq uint64,
-	lamport uint64,
+	serverSeq int64,
+	lamport int64,
 	actorID *time.ActorID,
 ) ID {
 	return ID{
@@ -85,7 +85,7 @@ func (id ID) NewTimeTicket(delimiter uint32) *time.Ticket {
 
 // SyncLamport syncs lamport timestamp with the given ID.
 //  - receiving: https://en.wikipedia.org/wiki/Lamport_timestamps#Algorithm
-func (id ID) SyncLamport(otherLamport uint64) ID {
+func (id ID) SyncLamport(otherLamport int64) ID {
 	if id.lamport < otherLamport {
 		return NewID(id.clientSeq, InitialServerSeq, otherLamport, id.actorID)
 	}
@@ -99,7 +99,7 @@ func (id ID) SetActor(actor *time.ActorID) ID {
 }
 
 // SetServerSeq sets server sequence of this ID.
-func (id ID) SetServerSeq(serverSeq uint64) ID {
+func (id ID) SetServerSeq(serverSeq int64) ID {
 	return NewID(id.clientSeq, serverSeq, id.lamport, id.actorID)
 }
 
@@ -109,12 +109,12 @@ func (id ID) ClientSeq() uint32 {
 }
 
 // ServerSeq returns the server sequence of this ID.
-func (id ID) ServerSeq() uint64 {
+func (id ID) ServerSeq() int64 {
 	return id.serverSeq
 }
 
 // Lamport returns the lamport clock of this ID.
-func (id ID) Lamport() uint64 {
+func (id ID) Lamport() int64 {
 	return id.lamport
 }
 
diff --git a/pkg/document/internal_document.go b/pkg/document/internal_document.go
index 07bef0e1..d57ce923 100644
--- a/pkg/document/internal_document.go
+++ b/pkg/document/internal_document.go
@@ -62,8 +62,8 @@ func NewInternalDocument(k key.Key) *InternalDocument {
 // NewInternalDocumentFromSnapshot creates a new instance of InternalDocument with the snapshot.
 func NewInternalDocumentFromSnapshot(
 	k key.Key,
-	serverSeq uint64,
-	lamport uint64,
+	serverSeq int64,
+	lamport int64,
 	snapshot []byte,
 ) (*InternalDocument, error) {
 	obj, err := converter.BytesToObject(snapshot)
@@ -160,7 +160,7 @@ func (d *InternalDocument) SetActor(actor *time.ActorID) {
 }
 
 // Lamport returns the Lamport clock of this document.
-func (d *InternalDocument) Lamport() uint64 {
+func (d *InternalDocument) Lamport() int64 {
 	return d.changeID.Lamport()
 }
 
@@ -189,7 +189,7 @@ func (d *InternalDocument) RootObject() *json.Object {
 	return d.root.Object()
 }
 
-func (d *InternalDocument) applySnapshot(snapshot []byte, serverSeq uint64) error {
+func (d *InternalDocument) applySnapshot(snapshot []byte, serverSeq int64) error {
 	rootObj, err := converter.BytesToObject(snapshot)
 	if err != nil {
 		return err
diff --git a/pkg/document/time/ticket.go b/pkg/document/time/ticket.go
index e4ce8e4c..b6938b2b 100644
--- a/pkg/document/time/ticket.go
+++ b/pkg/document/time/ticket.go
@@ -24,7 +24,7 @@ import (
 
 const (
 	// MaxLamport is the maximum value stored in lamport.
-	MaxLamport = math.MaxUint64
+	MaxLamport = math.MaxInt64
 
 	// MaxDelimiter is the maximum value stored in delimiter.
 	MaxDelimiter = math.MaxUint32
@@ -49,7 +49,7 @@ var (
 // Ticket is a timestamp of the logical clock. Ticket is immutable.
 // It is created by change.ID.
 type Ticket struct {
-	lamport   uint64
+	lamport   int64
 	delimiter uint32
 	actorID   *ActorID
 
@@ -59,7 +59,7 @@ type Ticket struct {
 
 // NewTicket creates an instance of Ticket.
 func NewTicket(
-	lamport uint64,
+	lamport int64,
 	delimiter uint32,
 	actorID *ActorID,
 ) *Ticket {
@@ -81,9 +81,9 @@ func (t *Ticket) AnnotatedString() string {
 // Key returns the key string for this Ticket.
 func (t *Ticket) Key() string {
 	if t.cachedKey == "" {
-		t.cachedKey = strconv.FormatUint(t.lamport, 10) +
+		t.cachedKey = strconv.FormatInt(t.lamport, 10) +
 			":" +
-			strconv.FormatUint(uint64(t.delimiter), 10) +
+			strconv.FormatInt(int64(t.delimiter), 10) +
 			":" +
 			t.actorID.String()
 
@@ -93,7 +93,7 @@ func (t *Ticket) Key() string {
 }
 
 // Lamport returns the lamport value.
-func (t *Ticket) Lamport() uint64 {
+func (t *Ticket) Lamport() int64 {
 	return t.lamport
 }
 
diff --git a/server/admin/server.go b/server/admin/server.go
index a4dc0384..dfa1e0ad 100644
--- a/server/admin/server.go
+++ b/server/admin/server.go
@@ -431,7 +431,7 @@ func (s *Server) ListChanges(
 	}
 	lastSeq := docInfo.ServerSeq
 
-	from, to := types.GetChangesRange(types.Paging[uint64]{
+	from, to := types.GetChangesRange(types.Paging[int64]{
 		Offset:    req.PreviousSeq,
 		PageSize:  int(req.PageSize),
 		IsForward: req.IsForward,
diff --git a/server/backend/config.go b/server/backend/config.go
index 275a8c13..5bf37b6a 100644
--- a/server/backend/config.go
+++ b/server/backend/config.go
@@ -30,10 +30,10 @@ type Config struct {
 
 	// SnapshotThreshold is the threshold that determines if changes should be
 	// sent with snapshot when the number of changes is greater than this value.
-	SnapshotThreshold uint64 `yaml:"SnapshotThreshold"`
+	SnapshotThreshold int64 `yaml:"SnapshotThreshold"`
 
 	// SnapshotInterval is the interval of changes to create a snapshot.
-	SnapshotInterval uint64 `yaml:"SnapshotInterval"`
+	SnapshotInterval int64 `yaml:"SnapshotInterval"`
 
 	// AuthWebhookMaxRetries is the max count that retries the authorization webhook.
 	AuthWebhookMaxRetries uint64 `yaml:"AuthWebhookMaxRetries"`
diff --git a/server/backend/database/change_info.go b/server/backend/database/change_info.go
index a3e99024..1138286b 100644
--- a/server/backend/database/change_info.go
+++ b/server/backend/database/change_info.go
@@ -34,9 +34,9 @@ var ErrEncodeOperationFailed = errors.New("encode operations failed")
 type ChangeInfo struct {
 	ID         types.ID `bson:"_id"`
 	DocID      types.ID `bson:"doc_id"`
-	ServerSeq  uint64   `bson:"server_seq"`
+	ServerSeq  int64    `bson:"server_seq"`
 	ClientSeq  uint32   `bson:"client_seq"`
-	Lamport    uint64   `bson:"lamport"`
+	Lamport    int64    `bson:"lamport"`
 	ActorID    types.ID `bson:"actor_id"`
 	Message    string   `bson:"message"`
 	Operations [][]byte `bson:"operations"`
diff --git a/server/backend/database/client_info.go b/server/backend/database/client_info.go
index b8049d4d..793660f7 100644
--- a/server/backend/database/client_info.go
+++ b/server/backend/database/client_info.go
@@ -47,7 +47,7 @@ const (
 // attached to the client.
 type ClientDocInfo struct {
 	Status    string `bson:"status"`
-	ServerSeq uint64 `bson:"server_seq"`
+	ServerSeq int64  `bson:"server_seq"`
 	ClientSeq uint32 `bson:"client_seq"`
 }
 
diff --git a/server/backend/database/database.go b/server/backend/database/database.go
index 0881d5fc..3e80b076 100644
--- a/server/backend/database/database.go
+++ b/server/backend/database/database.go
@@ -144,7 +144,7 @@ type Database interface {
 		ctx context.Context,
 		projectID types.ID,
 		docInfo *DocInfo,
-		initialServerSeq uint64,
+		initialServerSeq int64,
 		changes []*change.Change,
 	) error
 
@@ -152,23 +152,23 @@ type Database interface {
 	FindChangesBetweenServerSeqs(
 		ctx context.Context,
 		docID types.ID,
-		from uint64,
-		to uint64,
+		from int64,
+		to int64,
 	) ([]*change.Change, error)
 
 	// FindChangeInfosBetweenServerSeqs returns the changeInfos between two server sequences.
 	FindChangeInfosBetweenServerSeqs(
 		ctx context.Context,
 		docID types.ID,
-		from uint64,
-		to uint64,
+		from int64,
+		to int64,
 	) ([]*ChangeInfo, error)
 
 	// CreateSnapshotInfo stores the snapshot of the given document.
 	CreateSnapshotInfo(ctx context.Context, docID types.ID, doc *document.InternalDocument) error
 
 	// FindClosestSnapshotInfo finds the closest snapshot info in a given serverSeq.
-	FindClosestSnapshotInfo(ctx context.Context, docID types.ID, serverSeq uint64) (*SnapshotInfo, error)
+	FindClosestSnapshotInfo(ctx context.Context, docID types.ID, serverSeq int64) (*SnapshotInfo, error)
 
 	// UpdateAndFindMinSyncedTicket updates the given serverSeq of the given client
 	// and returns the min synced ticket.
@@ -176,7 +176,7 @@ type Database interface {
 		ctx context.Context,
 		clientInfo *ClientInfo,
 		docID types.ID,
-		serverSeq uint64,
+		serverSeq int64,
 	) (*time.Ticket, error)
 
 	// UpdateSyncedSeq updates the syncedSeq of the given client.
@@ -184,7 +184,7 @@ type Database interface {
 		ctx context.Context,
 		clientInfo *ClientInfo,
 		docID types.ID,
-		serverSeq uint64,
+		serverSeq int64,
 	) error
 
 	// FindDocInfosByPaging returns the documentInfos of the given paging.
diff --git a/server/backend/database/doc_info.go b/server/backend/database/doc_info.go
index 6a23a859..206d9346 100644
--- a/server/backend/database/doc_info.go
+++ b/server/backend/database/doc_info.go
@@ -35,7 +35,7 @@ type DocInfo struct {
 	Key key.Key `bson:"key"`
 
 	// ServerSeq is the sequence number of the last change of the document on the server.
-	ServerSeq uint64 `bson:"server_seq"`
+	ServerSeq int64 `bson:"server_seq"`
 
 	// Owner is the owner(ID of the client) of the document.
 	Owner types.ID `bson:"owner"`
@@ -51,7 +51,7 @@ type DocInfo struct {
 }
 
 // IncreaseServerSeq increases server sequence of the document.
-func (info *DocInfo) IncreaseServerSeq() uint64 {
+func (info *DocInfo) IncreaseServerSeq() int64 {
 	info.ServerSeq++
 	return info.ServerSeq
 }
diff --git a/server/backend/database/memory/database.go b/server/backend/database/memory/database.go
index 747e3077..a89dd1e2 100644
--- a/server/backend/database/memory/database.go
+++ b/server/backend/database/memory/database.go
@@ -610,7 +610,7 @@ func (d *DB) CreateChangeInfos(
 	ctx context.Context,
 	projectID types.ID,
 	docInfo *database.DocInfo,
-	initialServerSeq uint64,
+	initialServerSeq int64,
 	changes []*change.Change,
 ) error {
 	txn := d.db.Txn(true)
@@ -662,8 +662,8 @@ func (d *DB) CreateChangeInfos(
 func (d *DB) FindChangesBetweenServerSeqs(
 	ctx context.Context,
 	docID types.ID,
-	from uint64,
-	to uint64,
+	from int64,
+	to int64,
 ) ([]*change.Change, error) {
 	infos, err := d.FindChangeInfosBetweenServerSeqs(ctx, docID, from, to)
 	if err != nil {
@@ -686,8 +686,8 @@ func (d *DB) FindChangesBetweenServerSeqs(
 func (d *DB) FindChangeInfosBetweenServerSeqs(
 	ctx context.Context,
 	docID types.ID,
-	from uint64,
-	to uint64,
+	from int64,
+	to int64,
 ) ([]*database.ChangeInfo, error) {
 	txn := d.db.Txn(false)
 	defer txn.Abort()
@@ -746,7 +746,7 @@ func (d *DB) CreateSnapshotInfo(
 func (d *DB) FindClosestSnapshotInfo(
 	ctx context.Context,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*database.SnapshotInfo, error) {
 	txn := d.db.Txn(false)
 	defer txn.Abort()
@@ -783,7 +783,7 @@ func (d *DB) UpdateAndFindMinSyncedTicket(
 	ctx context.Context,
 	clientInfo *database.ClientInfo,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*time.Ticket, error) {
 	if err := d.UpdateSyncedSeq(ctx, clientInfo, docID, serverSeq); err != nil {
 		return nil, err
@@ -796,7 +796,7 @@ func (d *DB) UpdateAndFindMinSyncedTicket(
 		tblSyncedSeqs,
 		"doc_id_lamport_actor_id",
 		docID.String(),
-		uint64(0),
+		int64(0),
 		time.InitialActorID.String(),
 	)
 	if err != nil {
@@ -832,7 +832,7 @@ func (d *DB) UpdateSyncedSeq(
 	ctx context.Context,
 	clientInfo *database.ClientInfo,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) error {
 	txn := d.db.Txn(true)
 	defer txn.Abort()
@@ -986,7 +986,7 @@ func (d *DB) FindDocInfosByQuery(
 func (d *DB) findTicketByServerSeq(
 	txn *memdb.Txn,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*time.Ticket, error) {
 	if serverSeq == change.InitialServerSeq {
 		return time.InitialTicket, nil
diff --git a/server/backend/database/memory/indexes.go b/server/backend/database/memory/indexes.go
index 26d764f5..16f4d6c4 100644
--- a/server/backend/database/memory/indexes.go
+++ b/server/backend/database/memory/indexes.go
@@ -143,7 +143,7 @@ var schema = &memdb.DBSchema{
 					Indexer: &memdb.CompoundIndex{
 						Indexes: []memdb.Indexer{
 							&memdb.StringFieldIndex{Field: "DocID"},
-							&memdb.UintFieldIndex{Field: "ServerSeq"},
+							&memdb.IntFieldIndex{Field: "ServerSeq"},
 						},
 					},
 				},
@@ -163,7 +163,7 @@ var schema = &memdb.DBSchema{
 					Indexer: &memdb.CompoundIndex{
 						Indexes: []memdb.Indexer{
 							&memdb.StringFieldIndex{Field: "DocID"},
-							&memdb.UintFieldIndex{Field: "ServerSeq"},
+							&memdb.IntFieldIndex{Field: "ServerSeq"},
 						},
 					},
 				},
@@ -192,7 +192,7 @@ var schema = &memdb.DBSchema{
 					Indexer: &memdb.CompoundIndex{
 						Indexes: []memdb.Indexer{
 							&memdb.StringFieldIndex{Field: "DocID"},
-							&memdb.UintFieldIndex{Field: "Lamport"},
+							&memdb.IntFieldIndex{Field: "Lamport"},
 							&memdb.StringFieldIndex{Field: "ActorID"},
 						},
 					},
diff --git a/server/backend/database/mongo/client.go b/server/backend/database/mongo/client.go
index 848c8959..6d28464a 100644
--- a/server/backend/database/mongo/client.go
+++ b/server/backend/database/mongo/client.go
@@ -699,7 +699,7 @@ func (c *Client) CreateChangeInfos(
 	ctx context.Context,
 	projectID types.ID,
 	docInfo *database.DocInfo,
-	initialServerSeq uint64,
+	initialServerSeq int64,
 	changes []*change.Change,
 ) error {
 	encodedDocID, err := encodeID(docInfo.ID)
@@ -761,8 +761,8 @@ func (c *Client) CreateChangeInfos(
 func (c *Client) FindChangesBetweenServerSeqs(
 	ctx context.Context,
 	docID types.ID,
-	from uint64,
-	to uint64,
+	from int64,
+	to int64,
 ) ([]*change.Change, error) {
 	infos, err := c.FindChangeInfosBetweenServerSeqs(ctx, docID, from, to)
 	if err != nil {
@@ -785,8 +785,8 @@ func (c *Client) FindChangesBetweenServerSeqs(
 func (c *Client) FindChangeInfosBetweenServerSeqs(
 	ctx context.Context,
 	docID types.ID,
-	from uint64,
-	to uint64,
+	from int64,
+	to int64,
 ) ([]*database.ChangeInfo, error) {
 	encodedDocID, err := encodeID(docID)
 	if err != nil {
@@ -847,7 +847,7 @@ func (c *Client) CreateSnapshotInfo(
 func (c *Client) FindClosestSnapshotInfo(
 	ctx context.Context,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*database.SnapshotInfo, error) {
 	encodedDocID, err := encodeID(docID)
 	if err != nil {
@@ -886,7 +886,7 @@ func (c *Client) UpdateAndFindMinSyncedTicket(
 	ctx context.Context,
 	clientInfo *database.ClientInfo,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*time.Ticket, error) {
 	if err := c.UpdateSyncedSeq(ctx, clientInfo, docID, serverSeq); err != nil {
 		return nil, err
@@ -1027,7 +1027,7 @@ func (c *Client) UpdateSyncedSeq(
 	ctx context.Context,
 	clientInfo *database.ClientInfo,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) error {
 	encodedDocID, err := encodeID(docID)
 	if err != nil {
@@ -1090,7 +1090,7 @@ func (c *Client) UpdateSyncedSeq(
 func (c *Client) findTicketByServerSeq(
 	ctx context.Context,
 	docID types.ID,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*time.Ticket, error) {
 	if serverSeq == change.InitialServerSeq {
 		return time.InitialTicket, nil
diff --git a/server/backend/database/snapshot_info.go b/server/backend/database/snapshot_info.go
index a509ddb7..f7bd1787 100644
--- a/server/backend/database/snapshot_info.go
+++ b/server/backend/database/snapshot_info.go
@@ -31,10 +31,10 @@ type SnapshotInfo struct {
 	DocID types.ID `bson:"doc_id"`
 
 	// ServerSeq is the sequence number of the server which the snapshot belongs to.
-	ServerSeq uint64 `bson:"server_seq"`
+	ServerSeq int64 `bson:"server_seq"`
 
 	// Lamport is the Lamport timestamp of the snapshot.
-	Lamport uint64 `bson:"lamport"`
+	Lamport int64 `bson:"lamport"`
 
 	// Snapshot is the snapshot data.
 	Snapshot []byte `bson:"snapshot"`
diff --git a/server/backend/database/synced_seq_info.go b/server/backend/database/synced_seq_info.go
index ab03f400..608521a7 100644
--- a/server/backend/database/synced_seq_info.go
+++ b/server/backend/database/synced_seq_info.go
@@ -24,7 +24,7 @@ type SyncedSeqInfo struct {
 	ID        types.ID `bson:"_id"`
 	DocID     types.ID `bson:"doc_id"`
 	ClientID  types.ID `bson:"client_id"`
-	Lamport   uint64   `bson:"lamport"`
+	Lamport   int64    `bson:"lamport"`
 	ActorID   types.ID `bson:"actor_id"`
-	ServerSeq uint64   `bson:"server_seq"`
+	ServerSeq int64    `bson:"server_seq"`
 }
diff --git a/server/documents/documents.go b/server/documents/documents.go
index 96f17872..2c72ffb6 100644
--- a/server/documents/documents.go
+++ b/server/documents/documents.go
@@ -110,7 +110,7 @@ func GetDocumentByServerSeq(
 	be *backend.Backend,
 	project *types.Project,
 	k key.Key,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*document.InternalDocument, error) {
 	docInfo, err := be.DB.FindDocInfoByKeyAndOwner(
 		ctx,
diff --git a/server/packs/history.go b/server/packs/history.go
index 0d0cb2c9..20151c83 100644
--- a/server/packs/history.go
+++ b/server/packs/history.go
@@ -29,8 +29,8 @@ func FindChanges(
 	ctx context.Context,
 	be *backend.Backend,
 	docInfo *database.DocInfo,
-	from uint64,
-	to uint64,
+	from int64,
+	to int64,
 ) ([]*change.Change, error) {
 	changes, err := be.DB.FindChangesBetweenServerSeqs(
 		ctx,
diff --git a/server/packs/packs.go b/server/packs/packs.go
index bae84b01..54442bf1 100644
--- a/server/packs/packs.go
+++ b/server/packs/packs.go
@@ -165,7 +165,7 @@ func BuildDocumentForServerSeq(
 	ctx context.Context,
 	be *backend.Backend,
 	docInfo *database.DocInfo,
-	serverSeq uint64,
+	serverSeq int64,
 ) (*document.InternalDocument, error) {
 	snapshotInfo, err := be.DB.FindClosestSnapshotInfo(ctx, docInfo.ID, serverSeq)
 	if err != nil {
diff --git a/server/packs/pushpull.go b/server/packs/pushpull.go
index 59c4c2d8..9d98ecb5 100644
--- a/server/packs/pushpull.go
+++ b/server/packs/pushpull.go
@@ -40,7 +40,7 @@ func pushChanges(
 	clientInfo *database.ClientInfo,
 	docInfo *database.DocInfo,
 	reqPack *change.Pack,
-	initialServerSeq uint64,
+	initialServerSeq int64,
 ) (change.Checkpoint, []*change.Change) {
 	cp := clientInfo.Checkpoint(docInfo.ID)
 
@@ -85,7 +85,7 @@ func pullPack(
 	docInfo *database.DocInfo,
 	reqPack *change.Pack,
 	cpAfterPush change.Checkpoint,
-	initialServerSeq uint64,
+	initialServerSeq int64,
 ) (*ServerPack, error) {
 	if initialServerSeq < reqPack.Checkpoint.ServerSeq {
 		return nil, fmt.Errorf(
@@ -124,7 +124,7 @@ func pullSnapshot(
 	docInfo *database.DocInfo,
 	reqPack *change.Pack,
 	cpAfterPush change.Checkpoint,
-	initialServerSeq uint64,
+	initialServerSeq int64,
 ) (*ServerPack, error) {
 	// Build document from DB if the size of changes for the response is greater than the snapshot threshold.
 	doc, err := BuildDocumentForServerSeq(ctx, be, docInfo, initialServerSeq)
@@ -169,7 +169,7 @@ func pullChangeInfos(
 	docInfo *database.DocInfo,
 	reqPack *change.Pack,
 	cpAfterPush change.Checkpoint,
-	initialServerSeq uint64,
+	initialServerSeq int64,
 ) (change.Checkpoint, []*database.ChangeInfo, error) {
 	pulledChanges, err := be.DB.FindChangeInfosBetweenServerSeqs(
 		ctx,


Test patch:
diff --git a/api/types/change_summary_test.go b/api/types/change_summary_test.go
index ca1b375d..7a9a729d 100644
--- a/api/types/change_summary_test.go
+++ b/api/types/change_summary_test.go
@@ -26,103 +26,103 @@ import (
 
 func TestChangeSummary(t *testing.T) {
 	t.Run("get changes range test", func(t *testing.T) {
-		lastSeq := uint64(10)
-		var from, to uint64
+		lastSeq := int64(10)
+		var from, to int64
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    0,
 			PageSize:  0,
 			IsForward: false,
 		}, lastSeq)
-		assert.Equal(t, uint64(1), from)
-		assert.Equal(t, uint64(10), to)
+		assert.Equal(t, int64(1), from)
+		assert.Equal(t, int64(10), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    0,
 			PageSize:  0,
 			IsForward: true,
 		}, lastSeq)
-		assert.Equal(t, uint64(1), from)
-		assert.Equal(t, uint64(10), to)
+		assert.Equal(t, int64(1), from)
+		assert.Equal(t, int64(10), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    4,
 			PageSize:  3,
 			IsForward: false,
 		}, lastSeq)
-		assert.Equal(t, uint64(1), from)
-		assert.Equal(t, uint64(3), to)
+		assert.Equal(t, int64(1), from)
+		assert.Equal(t, int64(3), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    4,
 			PageSize:  3,
 			IsForward: true,
 		}, lastSeq)
-		assert.Equal(t, uint64(5), from)
-		assert.Equal(t, uint64(7), to)
+		assert.Equal(t, int64(5), from)
+		assert.Equal(t, int64(7), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    4,
 			PageSize:  100,
 			IsForward: false,
 		}, lastSeq)
-		assert.Equal(t, uint64(1), from)
-		assert.Equal(t, uint64(3), to)
+		assert.Equal(t, int64(1), from)
+		assert.Equal(t, int64(3), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    4,
 			PageSize:  100,
 			IsForward: true,
 		}, lastSeq)
-		assert.Equal(t, uint64(5), from)
-		assert.Equal(t, uint64(10), to)
+		assert.Equal(t, int64(5), from)
+		assert.Equal(t, int64(10), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    4,
 			PageSize:  0,
 			IsForward: false,
 		}, lastSeq)
-		assert.Equal(t, uint64(1), from)
-		assert.Equal(t, uint64(3), to)
+		assert.Equal(t, int64(1), from)
+		assert.Equal(t, int64(3), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    4,
 			PageSize:  0,
 			IsForward: true,
 		}, lastSeq)
-		assert.Equal(t, uint64(5), from)
-		assert.Equal(t, uint64(10), to)
+		assert.Equal(t, int64(5), from)
+		assert.Equal(t, int64(10), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    0,
 			PageSize:  2,
 			IsForward: false,
 		}, lastSeq)
-		assert.Equal(t, uint64(9), from)
-		assert.Equal(t, uint64(10), to)
+		assert.Equal(t, int64(9), from)
+		assert.Equal(t, int64(10), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    0,
 			PageSize:  2,
 			IsForward: true,
 		}, lastSeq)
-		assert.Equal(t, uint64(1), from)
-		assert.Equal(t, uint64(2), to)
+		assert.Equal(t, int64(1), from)
+		assert.Equal(t, int64(2), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    14,
 			PageSize:  3,
 			IsForward: false,
 		}, lastSeq)
-		assert.Equal(t, uint64(8), from)
-		assert.Equal(t, uint64(10), to)
+		assert.Equal(t, int64(8), from)
+		assert.Equal(t, int64(10), to)
 
-		from, to = types.GetChangesRange(types.Paging[uint64]{
+		from, to = types.GetChangesRange(types.Paging[int64]{
 			Offset:    14,
 			PageSize:  3,
 			IsForward: true,
 		}, lastSeq)
-		assert.Equal(t, uint64(lastSeq+1), from)
-		assert.Equal(t, uint64(lastSeq+1), to)
+		assert.Equal(t, int64(lastSeq+1), from)
+		assert.Equal(t, int64(lastSeq+1), to)
 	})
 }
diff --git a/pkg/document/time/ticket_test.go b/pkg/document/time/ticket_test.go
index 9c7c7c9f..00f0e8c8 100644
--- a/pkg/document/time/ticket_test.go
+++ b/pkg/document/time/ticket_test.go
@@ -25,7 +25,7 @@ func TestTicket(t *testing.T) {
 	t.Run("constructor and getter method test", func(t *testing.T) {
 		actorID, _ := time.ActorIDFromHex("0123456789abcdef01234567")
 		ticket := time.NewTicket(0, 1, actorID)
-		assert.Equal(t, uint64(0), ticket.Lamport())
+		assert.Equal(t, int64(0), ticket.Lamport())
 		assert.Equal(t, uint32(1), ticket.Delimiter())
 		assert.Equal(t, actorID, ticket.ActorID())
 
diff --git a/server/backend/database/memory/database_test.go b/server/backend/database/memory/database_test.go
index 633a3e86..648b3f17 100644
--- a/server/backend/database/memory/database_test.go
+++ b/server/backend/database/memory/database_test.go
@@ -192,7 +192,7 @@ func TestDB(t *testing.T) {
 		}
 		pack := doc.CreateChangePack()
 		for idx, c := range pack.Changes {
-			c.SetServerSeq(uint64(idx))
+			c.SetServerSeq(int64(idx))
 		}
 
 		// Store changes
@@ -230,26 +230,26 @@ func TestDB(t *testing.T) {
 		assert.NoError(t, db.CreateSnapshotInfo(ctx, docInfo.ID, doc.InternalDocument()))
 		snapshot, err := db.FindClosestSnapshotInfo(ctx, docInfo.ID, change.MaxCheckpoint.ServerSeq)
 		assert.NoError(t, err)
-		assert.Equal(t, uint64(0), snapshot.ServerSeq)
+		assert.Equal(t, int64(0), snapshot.ServerSeq)
 
 		pack := change.NewPack(doc.Key(), doc.Checkpoint().NextServerSeq(1), nil, nil)
 		assert.NoError(t, doc.ApplyChangePack(pack))
 		assert.NoError(t, db.CreateSnapshotInfo(ctx, docInfo.ID, doc.InternalDocument()))
 		snapshot, err = db.FindClosestSnapshotInfo(ctx, docInfo.ID, change.MaxCheckpoint.ServerSeq)
 		assert.NoError(t, err)
-		assert.Equal(t, uint64(1), snapshot.ServerSeq)
+		assert.Equal(t, int64(1), snapshot.ServerSeq)
 
 		pack = change.NewPack(doc.Key(), doc.Checkpoint().NextServerSeq(2), nil, nil)
 		assert.NoError(t, doc.ApplyChangePack(pack))
 		assert.NoError(t, db.CreateSnapshotInfo(ctx, docInfo.ID, doc.InternalDocument()))
 		snapshot, err = db.FindClosestSnapshotInfo(ctx, docInfo.ID, change.MaxCheckpoint.ServerSeq)
 		assert.NoError(t, err)
-		assert.Equal(t, uint64(2), snapshot.ServerSeq)
+		assert.Equal(t, int64(2), snapshot.ServerSeq)
 
 		assert.NoError(t, db.CreateSnapshotInfo(ctx, docInfo.ID, doc.InternalDocument()))
 		snapshot, err = db.FindClosestSnapshotInfo(ctx, docInfo.ID, 1)
 		assert.NoError(t, err)
-		assert.Equal(t, uint64(1), snapshot.ServerSeq)
+		assert.Equal(t, int64(1), snapshot.ServerSeq)
 	})
 
 	t.Run("docInfo pagination test", func(t *testing.T) {
diff --git a/server/config_test.go b/server/config_test.go
index 9e83d750..2d6bc353 100644
--- a/server/config_test.go
+++ b/server/config_test.go
@@ -37,8 +37,8 @@ func TestNewConfigFromFile(t *testing.T) {
 		assert.Equal(t, conf.RPC.CertFile, "")
 		assert.Equal(t, conf.RPC.KeyFile, "")
 
-		assert.Equal(t, conf.Backend.SnapshotThreshold, uint64(server.DefaultSnapshotThreshold))
-		assert.Equal(t, conf.Backend.SnapshotInterval, uint64(server.DefaultSnapshotInterval))
+		assert.Equal(t, conf.Backend.SnapshotThreshold, int64(server.DefaultSnapshotThreshold))
+		assert.Equal(t, conf.Backend.SnapshotInterval, int64(server.DefaultSnapshotInterval))
 
 		assert.Nil(t, conf.ETCD)
 	})
@@ -61,8 +61,8 @@ func TestNewConfigFromFile(t *testing.T) {
 		pingTimeout, err := time.ParseDuration(conf.Mongo.PingTimeout)
 		assert.NoError(t, err)
 		assert.Equal(t, pingTimeout, server.DefaultMongoPingTimeout)
-		assert.Equal(t, conf.Backend.SnapshotThreshold, uint64(server.DefaultSnapshotThreshold))
-		assert.Equal(t, conf.Backend.SnapshotInterval, uint64(server.DefaultSnapshotInterval))
+		assert.Equal(t, conf.Backend.SnapshotThreshold, int64(server.DefaultSnapshotThreshold))
+		assert.Equal(t, conf.Backend.SnapshotInterval, int64(server.DefaultSnapshotInterval))
 		assert.Equal(t, conf.Backend.AuthWebhookMaxRetries, uint64(server.DefaultAuthWebhookMaxRetries))
 
 		authWebhookMaxWaitInterval, err := time.ParseDuration(conf.Backend.AuthWebhookMaxWaitInterval)
diff --git a/test/helper/helper.go b/test/helper/helper.go
index 321336d5..296d35ca 100644
--- a/test/helper/helper.go
+++ b/test/helper/helper.go
@@ -54,7 +54,7 @@ var (
 	HousekeepingDeactivateThreshold = 1 * gotime.Minute
 	HousekeepingCandidatesLimit     = 10
 
-	SnapshotThreshold          = uint64(10)
+	SnapshotThreshold          = int64(10)
 	AuthWebhookMaxWaitInterval = 3 * gotime.Millisecond
 	AuthWebhookSize            = 100
 	AuthWebhookCacheAuthTTL    = 10 * gotime.Second