Documentation
¶
Index ¶
- Constants
- Variables
- func Init(posting *store.Store, log *commit.Logger)
- func Key(uid uint64, attr string) []byte
- func MergeLists(numRoutines int)
- func NewCounters() *counters
- func NewQuery(attr string, uids []uint64) []byte
- func ParseValue(i *interface{}, value []byte) error
- func ProcessTask(query []byte) (result []byte, rerr error)
- type ByUid
- type List
- func (l *List) AddMutation(t x.DirectedEdge, op byte) error
- func (l *List) Get(p *types.Posting, i int) bool
- func (l *List) GetUids() []uint64
- func (l *List) LastCompactionTs() time.Time
- func (l *List) Length() int
- func (l *List) MergeIfDirty() (merged bool, err error)
- func (l *List) SetForDeletion()
- func (l *List) Value() (result []byte, rerr error)
- type Map
- type MutationLink
Constants ¶
const Del = 0x02
const NBUCKETS = 32
const Set = 0x01
Variables ¶
var E_TMP_ERROR = errors.New("Temporary Error. Please retry.")
var MIB, MAX_MEMORY uint64
Functions ¶
func MergeLists ¶
func MergeLists(numRoutines int)
func NewCounters ¶
func NewCounters() *counters
func ParseValue ¶
func ProcessTask ¶
Types ¶
type List ¶
func GetOrCreate ¶
func (*List) AddMutation ¶
func (l *List) AddMutation(t x.DirectedEdge, op byte) error
In benchmarks, the time taken per AddMutation before was plateauing at 2.5 ms with sync per 10 log entries, and increasing for sync per 100 log entries (to 3 ms per AddMutation), largely because of how index generation was being done.
With this change, the benchmarks perform as good as benchmarks for commit.Logger, where the less frequently file sync happens, the faster AddMutations run.
PASS BenchmarkAddMutations_SyncEveryLogEntry-6 100 24712455 ns/op BenchmarkAddMutations_SyncEvery10LogEntry-6 500 2485961 ns/op BenchmarkAddMutations_SyncEvery100LogEntry-6 10000 298352 ns/op BenchmarkAddMutations_SyncEvery1000LogEntry-6 30000 63544 ns/op ok github.com/dgraph-io/dgraph/posting 10.291s
func (*List) LastCompactionTs ¶
func (*List) MergeIfDirty ¶
func (*List) SetForDeletion ¶
func (l *List) SetForDeletion()
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (*Map) StreamAllKeys ¶
func (*Map) StreamUntilCap ¶
type MutationLink ¶
type MutationLink struct {
// contains filtered or unexported fields
}