Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ankur-anand/unisondb
/ functions
Functions
3,181 in github.com/ankur-anand/unisondb
⨍
Functions
3,181
◇
Types & classes
414
↓ 23 callers
Method
WriteBatch
WriteBatch appends multiple records to the active segment in a single batched operation. If the batch cannot fit entirely in the current segment, it h
pkg/walfs/walog.go:473
↓ 23 callers
Method
WriteOffset
WriteOffset returns the current write offset of the segment. go:inline
pkg/walfs/segment.go:1107
↓ 22 callers
Method
PositionForIndex
PositionForIndex returns the RecordPosition for the given log index.
pkg/walfs/walog.go:708
↓ 22 callers
Method
Register
Register adds a service to the server. Services are setup in registration order and closed in reverse order.
cmd/unisondb/cliapp/service.go:29
↓ 22 callers
Method
SealSegment
SealSegment seals the given segment.
pkg/walfs/segment.go:603
↓ 22 callers
Function
decodeSegmentHeader
* Record Layout: ┌──────────────────────────────────────────────────────────────┐ │ 0..3 CRC32C(header[4:8] || data) │ │ 4
pkg/walfs/segment.go:137
↓ 22 callers
Function
setupTestCluster
(t *testing.T)
pkg/raftcluster/cluster_test.go:82
↓ 21 callers
Method
Apply
Apply proposes data to the Raft cluster and waits for it to be committed. Returns the committed log index and error if the proposal fails or times out
dbkernel/engine_raft.go:27
↓ 21 callers
Method
Close
Close gracefully shuts down the notifier.
plugin/notifier/zeromq/zeromq.go:168
↓ 21 callers
Method
LastIndex
LastIndex returns the last index written.
pkg/raftwalfs/log_store.go:110
↓ 21 callers
Method
NewRaftTxn
NewRaftTxn creates a new transaction in Raft mode.
dbkernel/raft_txn.go:44
↓ 20 callers
Method
Addr
()
pkg/raftmux/manager.go:113
↓ 20 callers
Method
BatchSetCells
(rowKeys [][]byte, columnEntriesPerRow []map[string][]byte)
pkg/kvdrivers/suite_test.go:38
↓ 20 callers
Method
Delete
(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption)
schemas/proto/gen/go/unisondb/replicator/v1/service_grpc.pb.go:44
↓ 20 callers
Function
KeyColumn
KeyColumn returns the storage key for a wide-column cell. If the row key is already typed ([KeyTypeWideColumn][len][row]), it simply appends the colum
pkg/kvdrivers/util.go:109
↓ 20 callers
Method
Namespace
Namespace returns the namespace for this connection.
pkg/raftmux/conn.go:99
↓ 20 callers
Function
NewZeroMQNotifier
NewZeroMQNotifier creates a new ZeroMQ notifier.
plugin/notifier/zeromq/zeromq.go:54
↓ 19 callers
Method
AppliedIndex
AppliedIndex returns the last applied Raft log index.
dbkernel/engine_raft.go:391
↓ 19 callers
Method
Commit
()
pkg/kvdrivers/suite_test.go:42
↓ 19 callers
Function
KeyBlobChunk
[type][blobIDLenBE(4)][blobID][chunkBE(4)].
internal/keycodec/keycodec.go:108
↓ 19 callers
Function
setupSingleNodeRaft
(t *testing.T, dir string, fsm raft.FSM)
dbkernel/engine_raft_test.go:42
↓ 18 callers
Method
Flush
()
pkg/umetrics/umetrics_test.go:94
↓ 18 callers
Method
GetKV
(key []byte)
internal/services/fuzzer/fuzz_engine.go:24
↓ 18 callers
Function
KeyKV
KeyKV returns the storage key for a key-value pair.
pkg/kvdrivers/util.go:63
↓ 18 callers
Function
NewLogStore
NewLogStore creates a new LogStore backed by the provided WAL.
pkg/raftwalfs/log_store.go:54
↓ 18 callers
Method
Notify
Notify sends a notification to all subscribers.
plugin/notifier/zeromq/zeromq.go:110
↓ 18 callers
Function
findLeader
(clusters []*builtCluster)
pkg/raftcluster/cluster_test.go:157
↓ 17 callers
Method
Accept
Accept waits for and returns the next inbound connection.
pkg/raftmux/stream_layer.go:46
↓ 17 callers
Method
ApplyRecordsLSNOnly
ApplyRecordsLSNOnly applies WAL records with LSN validation only.
dbkernel/replica.go:227
↓ 17 callers
Method
Close
Close closes the log store. wal uses mmap so we use ref counting as safe coordinator.
pkg/raftwalfs/log_store.go:327
↓ 17 callers
Method
DeleteRange
DeleteRange removes all indices in [min, max] range.
pkg/walfs/sharded_index.go:86
↓ 17 callers
Method
FirstIndex
FirstIndex returns the first index written.
pkg/raftwalfs/log_store.go:102
↓ 17 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/services/fuzzer/stats.go:133
↓ 17 callers
Function
closeClusters
(clusters []*builtCluster)
pkg/raftcluster/cluster_test.go:403
↓ 17 callers
Function
getValueStruct
(ops byte, entryType byte, value []byte)
dbkernel/utils.go:11
↓ 16 callers
Method
ApplyRecord
ApplyRecord validates and applies a WAL record to the mem table which later get flushed to Btree Store.
dbkernel/replica.go:66
↓ 16 callers
Method
Close
Close releases the underlying segment reader and marks the Reader as closed.
dbkernel/internal/wal/wal.go:377
↓ 16 callers
Method
IndexEntries
IndexEntries returns a copy of the index metadata for this segment.
pkg/walfs/segment.go:545
↓ 16 callers
Method
OperationType
()
schemas/logrecord/LogRecord.go:80
↓ 16 callers
Function
SerializeRowUpdateEntry
SerializeRowUpdateEntry encodes a single RowUpdateEntry into FlatBuffers.
internal/logcodec/row_codec.go:9
↓ 16 callers
Function
ToGRPCError
ToGRPCError Convert business error to gRPC error. Custom types to avoid ordering issue while calling the function.
internal/services/errors_codes.go:30
↓ 16 callers
Method
getEngine
(namespace string)
internal/services/httpapi/service.go:178
↓ 16 callers
Method
rotateMemTable
()
dbkernel/engine.go:750
↓ 16 callers
Method
writeOffset
(offset *wal.Offset)
dbkernel/engine.go:659
↓ 15 callers
Method
BackupLastRotatedSegment
BackupLastRotatedSegment copies the most recently sealed WAL segment into backupDir and returns the backup path.
pkg/walfs/walog.go:929
↓ 15 callers
Method
Close
Close closes the stream layer.
pkg/raftmux/stream_layer.go:56
↓ 15 callers
Method
Dial
Dial creates a new outbound connection to the given address.
pkg/raftmux/stream_layer.go:68
↓ 15 callers
Function
NewNamespaceStreamLayer
NewNamespaceStreamLayer creates a new NamespaceStreamLayer.
pkg/raftmux/stream_layer.go:32
↓ 15 callers
Function
RowKey
[type][rowLenBE(4)][row][col] Why this format? - The rowLen tells us where the row ends and the column begins. - Big Endian is used so that keys sort
internal/keycodec/keycodec.go:86
↓ 15 callers
Method
String
()
pkg/walfs/segment.go:167
↓ 15 callers
Method
WaitForIndexFlush
WaitForIndexFlush blocks until any pending index flush operations complete.
pkg/walfs/segment.go:589
↓ 15 callers
Function
file_unisondb_replicator_v1_service_proto_rawDescGZIP
()
schemas/proto/gen/go/unisondb/replicator/v1/service.pb.go:876
↓ 15 callers
Method
memTableWrite
memTableWrite will write the provided key and value to the memTable.
dbkernel/engine.go:714
↓ 14 callers
Function
DecodeOffset
(b []byte)
dbkernel/internal/wal/wal.go:50
↓ 14 callers
Method
Flush
Flush writes all entries from MemTable to BtreeStore.
dbkernel/internal/memtable/memtable.go:207
↓ 14 callers
Method
GetLOB
GetLOB returns the full LOB value (joined).
dbkernel/engine_public.go:794
↓ 14 callers
Function
NewBlobStoreStreamerClient
NewBlobStoreStreamerClient creates a new BlobStoreStreamerClient. startLSN is the LSN of the last record already applied; tailing resumes from the nex
internal/services/streamer/blob_store_streamer_client.go:43
↓ 14 callers
Method
Read
Read retrieves the WAL record at the given position.
dbkernel/internal/wal/wal.go:209
↓ 14 callers
Function
ReleaseRecords
ReleaseRecords releases the WAL records back to the shared pool once callers are done processing them. Callers must ensure they no longer reference th
pkg/replicator/pool.go:32
↓ 14 callers
Function
WithSegmentSize
WithSegmentSize sets the size for the Segment.
pkg/walfs/segment.go:282
↓ 14 callers
Function
WithSyncOption
WithSyncOption sets the sync option for the Segment.
pkg/walfs/segment.go:258
↓ 14 callers
Function
alignUp
alignUp returns the next multiple of alignSize greater than or equal to n. go:inline
pkg/walfs/segment.go:744
↓ 14 callers
Method
recoverWAL
recoverWAL recover wal from last check point saved in btree store.
dbkernel/internal/recovery/wal_recovery.go:56
↓ 14 callers
Function
setupRaftTxnTestEngine
(t *testing.T)
dbkernel/raft_txn_test.go:17
↓ 13 callers
Method
AppendKVTxn
AppendKVTxn appends a key-value pair to the transaction.
dbkernel/raft_txn.go:103
↓ 13 callers
Method
Calls
()
pkg/walfs/walog_test.go:2031
↓ 13 callers
Method
EntryType
()
schemas/logrecord/LogRecord.go:104
↓ 13 callers
Method
GetFirstLast
GetFirstLast returns the first and last indices in the index. Returns (0, 0, false) if the index is empty.
pkg/walfs/sharded_index.go:254
↓ 13 callers
Function
NewBlobStoreStreamer
NewBlobStoreStreamer returns an initialised BlobStoreStreamer. namespaceLogs must contain one partitionlog log per namespace.
internal/services/streamer/blob_store_steamer.go:87
↓ 13 callers
Function
NewWalIO
NewWalIO initializes and returns a new instance of WalIO.
dbkernel/internal/wal/wal.go:79
↓ 13 callers
Function
RowKey
[type][rowLenBE(4)][row][col] Why this format? - The rowLen tells us where the row ends and the column begins. - Big Endian is used so that keys sort
pkg/kvdrivers/util.go:95
↓ 13 callers
Function
WithReaderCommitCheck
WithReaderCommitCheck enables commit offset checking for readers. When enabled, readers will check against the committed position before advancing. If
pkg/walfs/walog.go:145
↓ 13 callers
Function
WithSegmentCustomMarker
WithSegmentCustomMarker sets the 4-byte marker written for new segments. Use WithSegmentCustomMarkerValidator to validate stored markers on open.
pkg/walfs/segment.go:298
↓ 13 callers
Function
WithSegmentCustomMarkerValidator
WithSegmentCustomMarkerValidator sets a validator for stored markers when opening segments.
pkg/walfs/segment.go:305
↓ 13 callers
Function
freePort
(t *testing.T)
pkg/raftcluster/membership_test.go:135
↓ 13 callers
Function
statusFromEngineError
(err error)
internal/services/httpapi/service.go:201
↓ 12 callers
Method
Close
Close flushes WAL data to disk using fsync and then closes all underlying WAL segments.
dbkernel/internal/wal/wal.go:198
↓ 12 callers
Method
Close
Close shuts down the streamer and flushes active partitionlog writers.
internal/services/streamer/blob_store_steamer.go:250
↓ 12 callers
Method
Commit
()
dbkernel/raft_txn.go:195
↓ 12 callers
Method
GetCell
(rowKey []byte, columnName string)
pkg/kvdrivers/suite_test.go:51
↓ 12 callers
Method
GetRowYValue
GetRowYValue returns all the mem table entries associated with the provided rowKey.
dbkernel/internal/memtable/memtable.go:177
↓ 12 callers
Method
IsSealed
IsSealed returns true if the segment is sealed (on-disk flag).
pkg/walfs/segment.go:642
↓ 12 callers
Function
NewDefaultConfig
()
dbkernel/internal/wal/common.go:102
↓ 12 callers
Function
NewMembership
NewMembership is used to setup and initialize a gossip Membership.
pkg/raftcluster/membership.go:245
↓ 12 callers
Method
NewReaderFromLSN
NewReaderFromLSN creates a WAL reader starting at the given LSN. It finds the segment containing the LSN and positions the reader appropriately. If ta
dbkernel/engine_public.go:767
↓ 12 callers
Method
NumVoters
NumVoters helper functions returns the number of voting peers in the current raft configurations.
pkg/raftcluster/cluster.go:276
↓ 12 callers
Method
Read
Read reads data from the connection.
pkg/raftmux/conn.go:28
↓ 12 callers
Method
RecoveredCount
()
dbkernel/internal/recovery/wal_recovery.go:31
↓ 12 callers
Method
SetOffset
(offset *wal.Offset)
dbkernel/internal/memtable/memtable.go:121
↓ 12 callers
Method
Snapshot
(w io.Writer)
pkg/kvdrivers/api.go:29
↓ 12 callers
Method
hasEvent
(event MemberEvent, node string)
pkg/raftcluster/membership_test.go:124
↓ 12 callers
Function
testMarkerValidator
(expected uint32)
pkg/walfs/segment_test.go:29
↓ 12 callers
Function
unsafeStringToBytes
(s string)
pkg/kvdrivers/util.go:70
↓ 11 callers
Method
Create
Create creates a new snapshot using the flushed index/term from the holder instead of the applied index/term passed by Raft.
dbkernel/fsm_snapshot_store.go:83
↓ 11 callers
Method
Delete
Delete removes an index from the map.
pkg/walfs/sharded_index.go:73
↓ 11 callers
Method
EventHandler
EventHandler handles events operation for Membership cluster.
pkg/raftcluster/membership.go:167
↓ 11 callers
Method
GetTransactionRecords
GetTransactionRecords returns all the WalRecord that is part of the particular Txn.
dbkernel/internal/wal/wal.go:433
↓ 11 callers
Method
IsZero
IsZero returns true if the RecordPosition is uninitialized, meaning both SegmentID and Offset are zero.
pkg/walfs/segment.go:194
↓ 11 callers
Method
LocalID
()
pkg/raftcluster/cluster.go:231
↓ 11 callers
Function
NewMemTable
NewMemTable returns an initialized mem-table.
dbkernel/internal/memtable/memtable.go:61
← previous
next →
101–200 of 3,181, ranked by callers