refactor filer proto chunk variable from mtime to modified_ts_ns

This commit is contained in:
chrislu
2022-10-28 12:53:19 -07:00
parent 1e0d64c048
commit ea2637734a
29 changed files with 255 additions and 258 deletions

View File

@@ -83,7 +83,7 @@ public class ReadChunks {
prevX,
point.x,
chunk.getFileId(),
chunk.getMtime(),
chunk.getModifiedTsNs(),
prevX - chunk.getOffset(),
chunk.getOffset() == prevX && chunk.getSize() == prevX - startPoint.x,
chunk.getCipherKey().toByteArray(),
@@ -100,7 +100,7 @@ public class ReadChunks {
public Point(long x, FilerProto.FileChunk chunk, boolean isStart) {
this.x = x;
this.ts = chunk.getMtime();
this.ts = chunk.getModifiedTsNs();
this.chunk = chunk;
this.isStart = isStart;
}

View File

@@ -98,7 +98,7 @@ public class SeaweedWrite {
.setFileId(fileId)
.setOffset(offset)
.setSize(bytesLength)
.setMtime(System.currentTimeMillis() / 10000L)
.setModifiedTsNs(System.nanoTime())
.setETag(etag)
.setCipherKey(cipherKeyString);
}

View File

@@ -132,7 +132,7 @@ message FileChunk {
string file_id = 1; // to be deprecated
int64 offset = 2;
uint64 size = 3;
int64 mtime = 4;
int64 modified_ts_ns = 4;
string e_tag = 5;
string source_file_id = 6; // to be deprecated
FileId fid = 7;