• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

linxGnu / grocksdb / 4228812372

pending completion
4228812372

push

github

GitHub
Adapt rocksdb 7.9.2 (#102)

3164 of 4872 relevant lines covered (64.94%)

0.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

24.0
/options_ingest.go
1
package grocksdb
2

3
// #include "rocksdb/c.h"
4
import "C"
5

6
// IngestExternalFileOptions represents available options when ingesting external files.
7
type IngestExternalFileOptions struct {
8
        c *C.rocksdb_ingestexternalfileoptions_t
9
}
10

11
// NewDefaultIngestExternalFileOptions creates a default IngestExternalFileOptions object.
12
func NewDefaultIngestExternalFileOptions() *IngestExternalFileOptions {
1✔
13
        return newNativeIngestExternalFileOptions(C.rocksdb_ingestexternalfileoptions_create())
1✔
14
}
1✔
15

16
// NewNativeIngestExternalFileOptions creates a IngestExternalFileOptions object.
17
func newNativeIngestExternalFileOptions(c *C.rocksdb_ingestexternalfileoptions_t) *IngestExternalFileOptions {
1✔
18
        return &IngestExternalFileOptions{c: c}
1✔
19
}
1✔
20

21
// SetMoveFiles specifies if it should move the files instead of copying them.
22
// Default to false.
23
func (opts *IngestExternalFileOptions) SetMoveFiles(flag bool) {
×
24
        C.rocksdb_ingestexternalfileoptions_set_move_files(opts.c, boolToChar(flag))
×
25
}
×
26

27
// SetSnapshotConsistency if specifies the consistency.
28
// If set to false, an ingested file key could appear in existing snapshots that were created before the
29
// file was ingested.
30
// Default to true.
31
func (opts *IngestExternalFileOptions) SetSnapshotConsistency(flag bool) {
×
32
        C.rocksdb_ingestexternalfileoptions_set_snapshot_consistency(opts.c, boolToChar(flag))
×
33
}
×
34

35
// SetAllowGlobalSeqNo sets allow_global_seqno. If set to false,IngestExternalFile() will fail if the file key
36
// range overlaps with existing keys or tombstones in the DB.
37
// Default true.
38
func (opts *IngestExternalFileOptions) SetAllowGlobalSeqNo(flag bool) {
×
39
        C.rocksdb_ingestexternalfileoptions_set_allow_global_seqno(opts.c, boolToChar(flag))
×
40
}
×
41

42
// SetAllowBlockingFlush sets allow_blocking_flush. If set to false and the file key range overlaps with
43
// the memtable key range (memtable flush required), IngestExternalFile will fail.
44
// Default to true.
45
func (opts *IngestExternalFileOptions) SetAllowBlockingFlush(flag bool) {
×
46
        C.rocksdb_ingestexternalfileoptions_set_allow_blocking_flush(opts.c, boolToChar(flag))
×
47
}
×
48

49
// SetIngestionBehind sets ingest_behind
50
// Set to true if you would like duplicate keys in the file being ingested
51
// to be skipped rather than overwriting existing data under that key.
52
// Usecase: back-fill of some historical data in the database without
53
// over-writing existing newer version of data.
54
// This option could only be used if the DB has been running
55
// with allow_ingest_behind=true since the dawn of time.
56
// All files will be ingested at the bottommost level with seqno=0.
57
func (opts *IngestExternalFileOptions) SetIngestionBehind(flag bool) {
×
58
        C.rocksdb_ingestexternalfileoptions_set_ingest_behind(opts.c, boolToChar(flag))
×
59
}
×
60

61
// Destroy deallocates the IngestExternalFileOptions object.
62
func (opts *IngestExternalFileOptions) Destroy() {
×
63
        C.rocksdb_ingestexternalfileoptions_destroy(opts.c)
×
64
        opts.c = nil
×
65
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc