Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Side by Side Diff: impl/memory/datastore.go

Issue 1911263002: Fix memory corruption bug in impl/memory (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: fix comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | impl/memory/datastore_data.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package memory 5 package memory
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "fmt" 9 "fmt"
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 d.data.addIndexes(idxs) 133 d.data.addIndexes(idxs)
134 } 134 }
135 135
136 func (d *dsImpl) TakeIndexSnapshot() ds.TestingSnapshot { 136 func (d *dsImpl) TakeIndexSnapshot() ds.TestingSnapshot {
137 return d.data.takeSnapshot() 137 return d.data.takeSnapshot()
138 } 138 }
139 139
140 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) { 140 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) {
141 » d.data.setSnapshot(snap.(*memStore)) 141 » d.data.setSnapshot(snap.(memStore))
142 } 142 }
143 143
144 func (d *dsImpl) CatchupIndexes() { 144 func (d *dsImpl) CatchupIndexes() {
145 d.data.catchupIndexes() 145 d.data.catchupIndexes()
146 } 146 }
147 147
148 func (d *dsImpl) SetTransactionRetryCount(count int) { 148 func (d *dsImpl) SetTransactionRetryCount(count int) {
149 d.data.setTxnRetry(count) 149 d.data.setTxnRetry(count)
150 } 150 }
151 151
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return countQuery(fq, d.data.parent.aid, d.ns, true, d.data.snap, d.data .snap) 218 return countQuery(fq, d.data.parent.aid, d.ns, true, d.data.snap, d.data .snap)
219 } 219 }
220 220
221 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio nOptions) error { 221 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio nOptions) error {
222 return errors.New("datastore: nested transactions are not supported") 222 return errors.New("datastore: nested transactions are not supported")
223 } 223 }
224 224
225 func (*txnDsImpl) Testable() ds.Testable { 225 func (*txnDsImpl) Testable() ds.Testable {
226 return nil 226 return nil
227 } 227 }
OLDNEW
« no previous file with comments | « no previous file | impl/memory/datastore_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698