From 8e8afb8c50fd3d245f48d0129bb33b826195560d Mon Sep 17 00:00:00 2001 From: Kevin Cai Date: Tue, 17 Nov 2026 10:16:32 -0400 Subject: [PATCH 1/2] Reconstruct the freelist in a single pass Finding the reachable pages took three passes over every bucket: one to mark its pages, one to check the key order and one to find the nested buckets. Do all of it in one pass when reconstructing the freelist. On a database that doesn't fit into memory, every page was read three times. Tx.Check is unchanged, it has to look up nested buckets through the in-memory nodes of a writable transaction. Signed-off-by: Kevin Cai --- db.go | 2 +- tx_check.go | 47 +++++++++++++- tx_check_whitebox_test.go | 129 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 4 deletions(-) create mode 100644 tx_check_whitebox_test.go diff --git a/db.go b/db.go index 770561c28..40052ef06 100644 --- a/db.go +++ b/db.go @@ -1292,7 +1292,7 @@ func (db *DB) freepages() []common.Pgid { go func() { defer close(ech) - tx.recursivelyCheckBucket(tx.root, reachable, nofreed, HexKVStringer(), ech) + tx.recursivelyCheckBucketPages(tx.root.RootPage(), reachable, nofreed, HexKVStringer(), ech) }() // following for loop will exit once channel is closed in the above goroutine. // we don't need to wait explictly with a waitgroup diff --git a/tx_check.go b/tx_check.go index 952da01e3..22d622f10 100644 --- a/tx_check.go +++ b/tx_check.go @@ -143,6 +143,35 @@ func (tx *Tx) recursivelyCheckBucket(b *Bucket, reachable map[common.Pgid]*commo }) } +// recursivelyCheckBucketPages verifies the same invariant properties as +// recursivelyCheckBucket does, for the bucket with the given root page and +// all buckets nested within it. The difference is that it reads every page +// only once: it verifies that a page is reachable and that its keys are in +// order when it visits the page, and it descends into nested buckets straight +// from the leaf pages they are stored in, rather than doing each of these in +// a pass of its own. +// +// Since nested buckets are looked up in the pages only, this must only be +// used with a read-only transaction, which has no in-memory nodes or buckets +// that differ from what is stored in the pages. +func (tx *Tx) recursivelyCheckBucketPages(rootPageId common.Pgid, reachable map[common.Pgid]*common.Page, + freed map[common.Pgid]bool, kvStringer KVStringer, ch chan error) { + // Ignore inline buckets. + if rootPageId == 0 { + return + } + + visitPage := func(p *common.Page, stack []common.Pgid) { + verifyPageReachable(p, tx.meta.Pgid(), stack, reachable, freed, ch) + } + visitBucket := func(value []byte) { + child := tx.root.openBucket(value) + tx.recursivelyCheckBucketPages(child.RootPage(), reachable, freed, kvStringer, ch) + } + + tx.recursivelyCheckPageKeyOrderInternal(rootPageId, nil, nil, nil, kvStringer.KeyToString, ch, visitPage, visitBucket) +} + func (tx *Tx) checkInvariantProperties(pageId common.Pgid, reachable map[common.Pgid]*common.Page, freed map[common.Pgid]bool, kvStringer KVStringer, ch chan error) { tx.forEachPage(pageId, func(p *common.Page, _ int, stack []common.Pgid) { @@ -179,7 +208,7 @@ func verifyPageReachable(p *common.Page, hwm common.Pgid, stack []common.Pgid, r // - keys on pages must be sorted // - keys on children pages are between 2 consecutive keys on the parent's branch page). func (tx *Tx) recursivelyCheckPageKeyOrder(pgId common.Pgid, keyToString func([]byte) string, ch chan error) { - tx.recursivelyCheckPageKeyOrderInternal(pgId, nil, nil, nil, keyToString, ch) + tx.recursivelyCheckPageKeyOrderInternal(pgId, nil, nil, nil, keyToString, ch, nil, nil) } // recursivelyCheckPageKeyOrderInternal verifies that all keys in the subtree rooted at `pgid` are: @@ -187,12 +216,20 @@ func (tx *Tx) recursivelyCheckPageKeyOrder(pgId common.Pgid, keyToString func([] // - <`maxKeyOpen` (can be nil) // - Are in right ordering relationship to their parents. // `pagesStack` is expected to contain IDs of pages from the tree root to `pgid` for the clean debugging message. +// +// If `visitPage` is not nil, it is called for every page of the subtree before +// its keys are verified. If `visitBucket` is not nil, it is called with the +// value of every bucket entry found on the leaf pages of the subtree. func (tx *Tx) recursivelyCheckPageKeyOrderInternal( pgId common.Pgid, minKeyClosed, maxKeyOpen []byte, pagesStack []common.Pgid, - keyToString func([]byte) string, ch chan error) (maxKeyInSubtree []byte) { + keyToString func([]byte) string, ch chan error, + visitPage func(p *common.Page, stack []common.Pgid), visitBucket func(value []byte)) (maxKeyInSubtree []byte) { p := tx.page(pgId) pagesStack = append(pagesStack, pgId) + if visitPage != nil { + visitPage(p, pagesStack) + } switch { case p.IsBranchPage(): // For branch page we navigate ranges of all subpages. @@ -205,7 +242,7 @@ func (tx *Tx) recursivelyCheckPageKeyOrderInternal( if i < len(p.BranchPageElements())-1 { maxKey = p.BranchPageElement(uint16(i + 1)).Key() } - maxKeyInSubtree = tx.recursivelyCheckPageKeyOrderInternal(elem.Pgid(), elem.Key(), maxKey, pagesStack, keyToString, ch) + maxKeyInSubtree = tx.recursivelyCheckPageKeyOrderInternal(elem.Pgid(), elem.Key(), maxKey, pagesStack, keyToString, ch, visitPage, visitBucket) runningMin = maxKeyInSubtree } return maxKeyInSubtree @@ -215,6 +252,10 @@ func (tx *Tx) recursivelyCheckPageKeyOrderInternal( elem := p.LeafPageElement(uint16(i)) verifyKeyOrder(pgId, "leaf", i, elem.Key(), runningMin, maxKeyOpen, ch, keyToString, pagesStack) runningMin = elem.Key() + + if visitBucket != nil && elem.IsBucketEntry() { + visitBucket(elem.Value()) + } } if p.Count() > 0 { return p.LeafPageElement(p.Count() - 1).Key() diff --git a/tx_check_whitebox_test.go b/tx_check_whitebox_test.go new file mode 100644 index 000000000..d4f7e9132 --- /dev/null +++ b/tx_check_whitebox_test.go @@ -0,0 +1,129 @@ +package bbolt + +import ( + "fmt" + "math/rand" + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + + "go.etcd.io/bbolt/internal/common" +) + +// TestTx_recursivelyCheckBucketPages ensures that checking all buckets in a +// single pass over their pages reaches exactly the same pages as checking +// them in multiple passes does, and that the freelist is reconstructed from +// the pages that aren't. +func TestTx_recursivelyCheckBucketPages(t *testing.T) { + // A page size below the one of the OS results in pages that don't + // start at an OS page boundary. + for _, pageSize := range []int{0, 1024} { + t.Run(fmt.Sprintf("pageSize=%d", pageSize), func(t *testing.T) { + testRecursivelyCheckBucketPages(t, pageSize) + }) + } +} + +func testRecursivelyCheckBucketPages(t *testing.T, pageSize int) { + path := filepath.Join(t.TempDir(), "db") + db, err := Open(path, 0600, &Options{PageSize: pageSize}) + require.NoError(t, err) + + rng := rand.New(rand.NewSource(1)) + randBytes := func(n int) []byte { + b := make([]byte, n) + _, _ = rng.Read(b) + return b + } + + // Create buckets that span multiple levels of branch pages, with + // values that need overflow pages, with nested buckets that have + // pages of their own and with nested buckets that are inline. + for round := 0; round < 10; round++ { + err = db.Update(func(tx *Tx) error { + for i := 0; i < 6; i++ { + top, err := tx.CreateBucketIfNotExists([]byte(fmt.Sprintf("top-%d", i))) + if err != nil { + return err + } + for j := 0; j < 300; j++ { + if err := top.Put(randBytes(16), randBytes(100)); err != nil { + return err + } + } + + nested, err := top.CreateBucketIfNotExists([]byte(fmt.Sprintf("nested-%d", round%4))) + if err != nil { + return err + } + if err := nested.Put(randBytes(8), randBytes(5*4096)); err != nil { + return err + } + + inline, err := nested.CreateBucketIfNotExists([]byte("inline")) + if err != nil { + return err + } + if err := inline.Put([]byte("key"), []byte("value")); err != nil { + return err + } + } + return nil + }) + require.NoError(t, err) + } + + // Free a good number of pages. + err = db.Update(func(tx *Tx) error { + for i := 0; i < 6; i += 2 { + if err := tx.DeleteBucket([]byte(fmt.Sprintf("top-%d", i))); err != nil { + return err + } + } + return nil + }) + require.NoError(t, err) + + check := func(fn func(tx *Tx, reachable map[common.Pgid]*common.Page, ch chan error)) map[common.Pgid]*common.Page { + tx, err := db.Begin(false) + require.NoError(t, err) + defer func() { + require.NoError(t, tx.Rollback()) + }() + + reachable := make(map[common.Pgid]*common.Page) + ch := make(chan error) + go func() { + defer close(ch) + fn(tx, reachable, ch) + }() + for err := range ch { + require.NoError(t, err) + } + + return reachable + } + + freed := make(map[common.Pgid]bool) + multiPass := check(func(tx *Tx, reachable map[common.Pgid]*common.Page, ch chan error) { + tx.recursivelyCheckBucket(tx.root, reachable, freed, HexKVStringer(), ch) + }) + singlePass := check(func(tx *Tx, reachable map[common.Pgid]*common.Page, ch chan error) { + tx.recursivelyCheckBucketPages(tx.root.RootPage(), reachable, freed, HexKVStringer(), ch) + }) + require.NotEmpty(t, multiPass) + require.Equal(t, multiPass, singlePass) + + // The freelist reconstructed when opening a database without a synced + // freelist consists of all pages that aren't reachable. + var expectedFree []common.Pgid + for id := common.Pgid(2); id < db.meta().Pgid(); id++ { + if _, ok := multiPass[id]; !ok { + expectedFree = append(expectedFree, id) + } + } + require.NotEmpty(t, expectedFree) + require.Equal(t, expectedFree, db.freepages()) + require.NoError(t, db.Close()) +} From 6248acf730f123adff17a528cdfb7210f06e725b Mon Sep 17 00:00:00 2001 From: Kevin Cai Date: Tue, 17 Nov 2026 10:16:33 -0400 Subject: [PATCH 2/2] Prefetch child pages when reconstructing the freelist The pages are read through the mmap one page fault at a time, so a cold open takes the number of pages times the latency of a read. Hint to the kernel with MADV_WILLNEED that all children of a branch page are about to be read, so that it starts reading them at once. That includes the overflow pages of the children that hold keys. Signed-off-by: Kevin Cai --- bolt_aix.go | 6 ++ bolt_android.go | 6 ++ bolt_solaris.go | 6 ++ bolt_unix.go | 6 ++ bolt_windows.go | 4 ++ db.go | 128 +++++++++++++++++++++++++++++++++ db_whitebox_test.go | 170 ++++++++++++++++++++++++++++++++++++++++++++ tx_check.go | 5 ++ 8 files changed, 331 insertions(+) diff --git a/bolt_aix.go b/bolt_aix.go index 596e54060..e568b1844 100644 --- a/bolt_aix.go +++ b/bolt_aix.go @@ -76,6 +76,12 @@ func mmap(db *DB, sz int) error { return nil } +// madviseWillNeed advises the kernel that the given part of the mmap is +// going to be accessed soon. It is only a hint, so a failure is ignored. +func madviseWillNeed(b []byte) { + _ = unix.Madvise(b, syscall.MADV_WILLNEED) +} + // munmap unmaps a DB's data file from memory. func munmap(db *DB) error { // Ignore the unmap if we have no mapped data. diff --git a/bolt_android.go b/bolt_android.go index ac64fcf5b..681ec771a 100644 --- a/bolt_android.go +++ b/bolt_android.go @@ -76,6 +76,12 @@ func mmap(db *DB, sz int) error { return nil } +// madviseWillNeed advises the kernel that the given part of the mmap is +// going to be accessed soon. It is only a hint, so a failure is ignored. +func madviseWillNeed(b []byte) { + _ = unix.Madvise(b, syscall.MADV_WILLNEED) +} + // munmap unmaps a DB's data file from memory. func munmap(db *DB) error { // Ignore the unmap if we have no mapped data. diff --git a/bolt_solaris.go b/bolt_solaris.go index 56b2ccab4..cf459559a 100644 --- a/bolt_solaris.go +++ b/bolt_solaris.go @@ -74,6 +74,12 @@ func mmap(db *DB, sz int) error { return nil } +// madviseWillNeed advises the kernel that the given part of the mmap is +// going to be accessed soon. It is only a hint, so a failure is ignored. +func madviseWillNeed(b []byte) { + _ = unix.Madvise(b, syscall.MADV_WILLNEED) +} + // munmap unmaps a DB's data file from memory. func munmap(db *DB) error { // Ignore the unmap if we have no mapped data. diff --git a/bolt_unix.go b/bolt_unix.go index f68e721f5..18ff9cc19 100644 --- a/bolt_unix.go +++ b/bolt_unix.go @@ -73,6 +73,12 @@ func mmap(db *DB, sz int) error { return nil } +// madviseWillNeed advises the kernel that the given part of the mmap is +// going to be accessed soon. It is only a hint, so a failure is ignored. +func madviseWillNeed(b []byte) { + _ = unix.Madvise(b, syscall.MADV_WILLNEED) +} + // munmap unmaps a DB's data file from memory. func munmap(db *DB) error { // Ignore the unmap if we have no mapped data. diff --git a/bolt_windows.go b/bolt_windows.go index e99a0d621..6b3e3d34b 100644 --- a/bolt_windows.go +++ b/bolt_windows.go @@ -102,6 +102,10 @@ func mmap(db *DB, sz int) error { return nil } +// madviseWillNeed is a no-op on Windows. +func madviseWillNeed(_ []byte) { +} + // munmap unmaps a pointer from a file. // Based on: https://github.com/edsrzf/mmap-go func munmap(db *DB) error { diff --git a/db.go b/db.go index 40052ef06..837d06ffc 100644 --- a/db.go +++ b/db.go @@ -1132,6 +1132,134 @@ func (db *DB) page(id common.Pgid) *common.Page { return (*common.Page)(unsafe.Pointer(&db.data[pos])) } +// prefetchChildren hints to the kernel that the children of the given branch +// page are about to be read, so that it can start reading all of them from +// disk right away rather than one after the other as they are accessed. That +// includes the overflow pages of the children that are read. It does nothing +// for any other type of page. +func (db *DB) prefetchChildren(p *common.Page) { + if !p.IsBranchPage() || p.Count() == 0 { + return + } + + // Children that are next to each other in the file are requested with + // a single call. + first := p.BranchPageElement(0).Pgid() + last := first + for i := uint16(1); i < p.Count(); i++ { + id := p.BranchPageElement(i).Pgid() + if id == last+1 { + last = id + continue + } + + db.prefetchPages(first, last) + first, last = id, id + } + db.prefetchPages(first, last) + + // Whether a child has overflow pages is only known from its header, + // which is being read by now. Request these before any of the + // children is visited, so that they are read at the same time too. + limit := common.Pgid(db.datasz / db.pageSize) + for i := uint16(0); i < p.Count(); i++ { + id := p.BranchPageElement(i).Pgid() + if id >= limit { + continue + } + forEachOverflowRead(db.page(id), db.pageSize, db.prefetchPages) + } +} + +// forEachOverflowRead calls fn with every range of overflow pages of the +// given page that is read when the freelist is reconstructed. For a branch +// page that is all of them. For a leaf page it is only those that hold a key +// or a bucket, the rest of the values is not looked at. +func forEachOverflowRead(p *common.Page, pageSize int, fn func(first, last common.Pgid)) { + overflow := common.Pgid(p.Overflow()) + if overflow == 0 || pageSize <= 0 { + return + } + + if p.IsBranchPage() { + fn(p.Id()+1, p.Id()+overflow) + return + } + if !p.IsLeafPage() { + return + } + + // The elements are stored in order, so remembering the last page that + // was reported is enough to not report a page twice. + var reported common.Pgid + base := uintptr(unsafe.Pointer(p)) + for i := uint16(0); i < p.Count(); i++ { + elem := p.LeafPageElement(i) + size := uintptr(elem.Ksize()) + if elem.IsBucketEntry() { + size += uintptr(elem.Vsize()) + } + if size == 0 { + continue + } + + start := uintptr(unsafe.Pointer(elem)) - base + uintptr(elem.Pos()) + first := common.Pgid(start / uintptr(pageSize)) + last := common.Pgid((start + size - 1) / uintptr(pageSize)) + if first <= reported { + first = reported + 1 + } + if last > overflow { + last = overflow + } + if first > last { + continue + } + + fn(p.Id()+first, p.Id()+last) + reported = last + } +} + +// prefetchPages hints to the kernel that the given range of pages is about to +// be read. +func (db *DB) prefetchPages(first, last common.Pgid) { + start, end, ok := prefetchRange(first, last, db.pageSize, os.Getpagesize(), db.datasz) + if !ok { + return + } + + madviseWillNeed(db.data[start:end:end]) +} + +// prefetchRange returns the range of bytes within a mmap of the given size +// that holds the given range of pages. The range is widened to start and end +// at boundaries of OS pages, which can be larger than the pages of a database. +func prefetchRange(first, last common.Pgid, pageSize, osPageSize, mmapSize int) (int, int, bool) { + if first > last || pageSize <= 0 || osPageSize <= 0 { + return 0, 0, false + } + + // Don't touch anything beyond the mmap. That also takes care of page + // ids that are too large for the offsets below to be computed. + if uint64(last) >= uint64(mmapSize)/uint64(pageSize) { + return 0, 0, false + } + + start := int(first) * pageSize + end := (int(last) + 1) * pageSize + + start -= start % osPageSize + if rem := end % osPageSize; rem != 0 { + end += osPageSize - rem + } + if end > mmapSize { + end = mmapSize + } + + return start, end, true +} + // pageInBuffer retrieves a page reference from a given byte array based on the current page size. func (db *DB) pageInBuffer(b []byte, id common.Pgid) *common.Page { return (*common.Page)(unsafe.Pointer(&b[id*common.Pgid(db.pageSize)])) diff --git a/db_whitebox_test.go b/db_whitebox_test.go index 130c3e349..b95e6c496 100644 --- a/db_whitebox_test.go +++ b/db_whitebox_test.go @@ -1,6 +1,7 @@ package bbolt import ( + "math" "path/filepath" "testing" @@ -8,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt/errors" + "go.etcd.io/bbolt/internal/common" ) func TestOpenWithPreLoadFreelist(t *testing.T) { @@ -124,3 +126,171 @@ func prepareData(t *testing.T) (string, error) { return fileName, nil } + +func TestPrefetchRange(t *testing.T) { + const mmapSize = 1 << 20 + + testCases := []struct { + name string + first, last common.Pgid + pageSize int + osPageSize int + + expectedStart, expectedEnd int + expectedOK bool + }{ + { + name: "single page", + first: 3, last: 3, pageSize: 4096, osPageSize: 4096, + expectedStart: 3 * 4096, expectedEnd: 4 * 4096, expectedOK: true, + }, + { + name: "multiple pages", + first: 3, last: 7, pageSize: 4096, osPageSize: 4096, + expectedStart: 3 * 4096, expectedEnd: 8 * 4096, expectedOK: true, + }, + { + name: "pages smaller than OS pages", + first: 5, last: 6, pageSize: 1024, osPageSize: 4096, + expectedStart: 4096, expectedEnd: 8192, expectedOK: true, + }, + { + name: "pages smaller than OS pages across a boundary", + first: 7, last: 8, pageSize: 1024, osPageSize: 4096, + expectedStart: 4096, expectedEnd: 3 * 4096, expectedOK: true, + }, + { + name: "pages larger than OS pages", + first: 1, last: 1, pageSize: 16384, osPageSize: 4096, + expectedStart: 16384, expectedEnd: 2 * 16384, expectedOK: true, + }, + { + name: "last page of the mmap", + first: 255, last: 255, pageSize: 4096, osPageSize: 16384, + expectedStart: 252 * 4096, expectedEnd: mmapSize, expectedOK: true, + }, + { + name: "beyond the mmap", + first: 255, last: 256, pageSize: 4096, osPageSize: 4096, + }, + { + name: "page id overflowing the offset", + first: 1, last: common.Pgid(math.MaxUint64), pageSize: 4096, osPageSize: 4096, + }, + { + name: "empty range", + first: 4, last: 3, pageSize: 4096, osPageSize: 4096, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + start, end, ok := prefetchRange(tc.first, tc.last, tc.pageSize, tc.osPageSize, mmapSize) + require.Equal(t, tc.expectedOK, ok) + require.Equal(t, tc.expectedStart, start) + require.Equal(t, tc.expectedEnd, end) + }) + } +} + +func TestForEachOverflowRead(t *testing.T) { + const pageSize = 4096 + + type pageRange struct{ first, last common.Pgid } + + bucket := make([]byte, common.BucketHeaderSize) + + testCases := []struct { + name string + flags uint16 + overflow uint32 + inodes []struct { + flags uint32 + key, value []byte + } + expected []pageRange + }{ + { + name: "leaf page without overflow", + flags: common.LeafPageFlag, + inodes: []struct { + flags uint32 + key, value []byte + }{ + {key: []byte("a"), value: make([]byte, 100)}, + {key: []byte("b"), value: make([]byte, 100)}, + }, + }, + { + // The second key starts on the second page and the third + // one on the third page. The last two pages only hold the + // value of the third key. + name: "leaf page with overflow", + flags: common.LeafPageFlag, + overflow: 4, + inodes: []struct { + flags uint32 + key, value []byte + }{ + {key: []byte("a"), value: make([]byte, 6000)}, + {key: []byte("b"), value: make([]byte, 5000)}, + {key: []byte("c"), value: make([]byte, 9000)}, + }, + expected: []pageRange{{11, 11}, {12, 12}}, + }, + { + // Both the second key and the bucket are on the second + // page, which must be reported only once. + name: "leaf page with keys sharing an overflow page", + flags: common.LeafPageFlag, + overflow: 1, + inodes: []struct { + flags uint32 + key, value []byte + }{ + {key: []byte("a"), value: make([]byte, 6000)}, + {key: []byte("b"), value: make([]byte, 100)}, + {flags: common.BucketLeafFlag, key: []byte("c"), value: bucket}, + }, + expected: []pageRange{{11, 11}}, + }, + { + name: "branch page with overflow", + flags: common.BranchPageFlag, + overflow: 2, + inodes: []struct { + flags uint32 + key, value []byte + }{ + {key: make([]byte, 5000)}, + {key: make([]byte, 5000)}, + }, + expected: []pageRange{{11, 12}}, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + buf := make([]byte, (int(tc.overflow)+1)*pageSize) + p := common.LoadPage(buf) + p.SetId(10) + p.SetFlags(tc.flags) + p.SetCount(uint16(len(tc.inodes))) + p.SetOverflow(tc.overflow) + + inodes := make(common.Inodes, len(tc.inodes)) + for i, in := range tc.inodes { + inodes[i].SetFlags(in.flags) + inodes[i].SetKey(in.key) + inodes[i].SetValue(in.value) + } + common.WriteInodeToPage(inodes, p) + + var got []pageRange + forEachOverflowRead(p, pageSize, func(first, last common.Pgid) { + got = append(got, pageRange{first, last}) + }) + require.Equal(t, tc.expected, got) + }) + } +} diff --git a/tx_check.go b/tx_check.go index 22d622f10..47ac0e46b 100644 --- a/tx_check.go +++ b/tx_check.go @@ -163,6 +163,11 @@ func (tx *Tx) recursivelyCheckBucketPages(rootPageId common.Pgid, reachable map[ visitPage := func(p *common.Page, stack []common.Pgid) { verifyPageReachable(p, tx.meta.Pgid(), stack, reachable, freed, ch) + + // The children of a branch page are visited next. Reading them + // one by one as they are accessed is slow on storage with a high + // latency, so have the kernel start reading all of them already. + tx.db.prefetchChildren(p) } visitBucket := func(value []byte) { child := tx.root.openBucket(value)