Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions section_inverted_text_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ func (i *invertedTextIndexSection) InitOpaque(args map[string]interface{}) reset
}

type invertedIndexOpaque struct {
bytesWritten uint64 // atomic access to this variable, moved to top to correct alignment issues on ARM, 386 and 32-bit MIPS.

results []index.Document

chunkMode uint32
Expand Down Expand Up @@ -967,9 +969,8 @@ type invertedIndexOpaque struct {

fieldAddrs map[int]int

bytesWritten uint64
fieldsSame bool
numDocs uint64
fieldsSame bool
numDocs uint64
}

func (io *invertedIndexOpaque) Reset() (err error) {
Expand Down
8 changes: 4 additions & 4 deletions segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func (*ZapPlugin) Open(path string) (segment.Segment, error) {
// SegmentBase is a memory only, read-only implementation of the
// segment.Segment interface, using zap's data representation.
type SegmentBase struct {
// atomic access to these variables, moved to top to correct alignment issues on ARM, 386 and 32-bit MIPS.
bytesRead uint64
bytesWritten uint64

mem []byte
memCRC uint32
chunkMode uint32
Expand All @@ -105,10 +109,6 @@ type SegmentBase struct {
fieldDvNames []string // field names cached in fieldDvReaders
size uint64

// atomic access to these variables
bytesRead uint64
bytesWritten uint64

m sync.Mutex
fieldFSTs map[uint16]*vellum.FST

Expand Down
Loading