Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
3d0b0a68
Commit
3d0b0a68
authored
Nov 27, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0a94ba43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
wcfs/wcfs.go
wcfs/wcfs.go
+12
-4
No files found.
wcfs/wcfs.go
View file @
3d0b0a68
...
...
@@ -522,6 +522,9 @@ type BigFile struct {
// zbf.Size(). It is constant during liftime of current transaction.
zbfSize
int64
// change history of this file.
δFtail
*
ΔTailI64
// [](rev, []#blk)
// TODO -> δFtail
// lastChange zodb.Tid // last change to whole bigfile as of .zconn.At view
}
...
...
@@ -839,6 +842,9 @@ func bigopen(ctx context.Context, zconn *ZConn, oid zodb.Oid) (_ *BigFile, err e
zconn
:
zconn
,
zbf
:
zbf
,
zbfSize
:
zbfSize
,
// XXX this is needed only for head/
δFtail
:
NewΔTailI64
(),
// XXX indicate we have coverage starting from zconn.at?
},
nil
}
...
...
@@ -933,6 +939,7 @@ func (bfdata *BigFileData) Read(_ nodefs.File, dest []byte, off int64, fctx *fus
// len(dest) == blksize.
func
(
bfdata
*
BigFileData
)
readBlk
(
ctx
context
.
Context
,
blk
int64
,
dest
[]
byte
)
error
{
// XXX errctx?
// XXX locking
// check if someone else is already loading this block
bfdata
.
loadMu
.
Lock
()
...
...
@@ -968,11 +975,12 @@ func (bfdata *BigFileData) readBlk(ctx context.Context, blk int64, dest []byte)
close
(
loading
.
ready
)
// XXX before loading.ready?
/*
blkrevmax2 := max(δFtail.by(blk)) || min(rev for rev in δFtail
)
revmax = min(blkrevmax1, blkrevmax2)
blkrevmax2
,
_
:=
bfdata
.
bigfile
.
δFtail
.
LastRevOf
(
blk
,
zbf
.
PJar
()
.
At
())
//revmax := min(blkrevmax1, blkrevmax2
)
revmax
:=
blkrevmax2
_
=
revmax
/*
// XXX remmapping
// XXX -> own func?
// XXX locking
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment