Skip to content

Commit 2725dc8

Browse files
authored
chore: fix some comments (#2092)
<!-- Change Github PR Title Your title must be in the following format: - `topic(Area): Feature` - `Topic` must be one of `build|ci|docs|feat|fix|perf|refactor|chore|test` Sample Titles: - `feat(Enterprise)`: Backups can now get credentials from IAM - `fix(Query)`: Skipping floats that cannot be Marshalled in JSON - `perf: [Breaking]` json encoding is now 35% faster if SIMD is present - `chore`: all chores/tests will be excluded from the CHANGELOG --> ## Problem fix some comments <!-- Please add a description with these things: 1. Explain the problem by providing a good description. 2. If it fixes any GitHub issues, say "Fixes #GitHubIssue". 3. If it corresponds to a Jira issue, say "Fixes DGRAPH-###". 4. If this is a breaking change, please prefix `[Breaking]` in the title. In the description, please put a note with exactly who these changes are breaking for. --> ## Solution <!-- Please add a description with these things: 1. Explain the solution to make it easier to review the PR. 2. Make it easier for the reviewer by describing complex sections with comments. --> Signed-off-by: dufucun <dufuchun@sohu.com>
1 parent 70ab90f commit 2725dc8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

db.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func checkAndSetOptions(opt *Options) error {
166166
"reduce opt.ValueThreshold or increase opt.BaseTableSize.",
167167
opt.ValueThreshold, opt.maxBatchSize)
168168
}
169-
// ValueLogFileSize should be stricly LESS than 2<<30 otherwise we will
169+
// ValueLogFileSize should be strictly LESS than 2<<30 otherwise we will
170170
// overflow the uint32 when we mmap it in OpenMemtable.
171171
if !(opt.ValueLogFileSize < 2<<30 && opt.ValueLogFileSize >= 1<<20) {
172172
return ErrValueLogSize
@@ -403,7 +403,7 @@ func Open(opt Options) (*DB, error) {
403403
return db, nil
404404
}
405405

406-
// initBannedNamespaces retrieves the banned namepsaces from the DB and updates in-memory structure.
406+
// initBannedNamespaces retrieves the banned namespaces from the DB and updates in-memory structure.
407407
func (db *DB) initBannedNamespaces() error {
408408
if db.opt.NamespaceOffset < 0 {
409409
return nil
@@ -905,7 +905,7 @@ func (db *DB) sendToWriteCh(entries []*Entry) (*request, error) {
905905
return nil, ErrTxnTooBig
906906
}
907907

908-
// We can only service one request because we need each txn to be stored in a contigous section.
908+
// We can only service one request because we need each txn to be stored in a contiguous section.
909909
// Txns should not interleave among other txns or rewrites.
910910
req := requestPool.Get().(*request)
911911
req.reset()
@@ -1710,7 +1710,7 @@ func (db *DB) dropAll() (func(), error) {
17101710
if err != nil {
17111711
return f, err
17121712
}
1713-
// prepareToDrop will stop all the incomming write and flushes any pending memtables.
1713+
// prepareToDrop will stop all the incoming write and flushes any pending memtables.
17141714
// Before we drop, we'll stop the compaction because anyways all the datas are going to
17151715
// be deleted.
17161716
db.stopCompactions()
@@ -1753,7 +1753,7 @@ func (db *DB) dropAll() (func(), error) {
17531753

17541754
// DropPrefix would drop all the keys with the provided prefix. It does this in the following way:
17551755
// - Stop accepting new writes.
1756-
// - Stop memtable flushes before acquiring lock. Because we're acquring lock here
1756+
// - Stop memtable flushes before acquiring lock. Because we're acquiring lock here
17571757
// and memtable flush stalls for lock, which leads to deadlock
17581758
// - Flush out all memtables, skipping over keys with the given prefix, Kp.
17591759
// - Write out the value log header to memtables when flushing, so we don't accidentally bring Kp

0 commit comments

Comments
 (0)