Skip to content

Commit b705049

Browse files
authored
Replace emptyDb() with new emptyData() (redis#12646)
The function was renamed, but the comments were outdated.
1 parent 77a65e8 commit b705049

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ implementations are the following:
420420
* `lookupKeyRead()` and `lookupKeyWrite()` are used in order to get a pointer to the value associated to a given key, or `NULL` if the key does not exist.
421421
* `dbAdd()` and its higher level counterpart `setKey()` create a new key in a Redis database.
422422
* `dbDelete()` removes a key and its associated value.
423-
* `emptyDb()` removes an entire single database or all the databases defined.
423+
* `emptyData()` removes an entire single database or all the databases defined.
424424

425425
The rest of the file implements the generic commands exposed to the client.
426426

src/db.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ void signalFlushedDb(int dbid, int async) {
630630
* Type agnostic commands operating on the key space
631631
*----------------------------------------------------------------------------*/
632632

633-
/* Return the set of flags to use for the emptyDb() call for FLUSHALL
633+
/* Return the set of flags to use for the emptyData() call for FLUSHALL
634634
* and FLUSHDB commands.
635635
*
636636
* sync: flushes the database in an sync manner.

src/replication.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ int slaveIsInHandshakeState(void) {
17361736
* not, since the byte is indivisible.
17371737
*
17381738
* The function is called in two contexts: while we flush the current
1739-
* data with emptyDb(), and while we load the new data received as an
1739+
* data with emptyData(), and while we load the new data received as an
17401740
* RDB file from the master. */
17411741
void replicationSendNewlineToMaster(void) {
17421742
static time_t newline_sent;
@@ -1747,7 +1747,7 @@ void replicationSendNewlineToMaster(void) {
17471747
}
17481748
}
17491749

1750-
/* Callback used by emptyDb() while flushing away old data to load
1750+
/* Callback used by emptyData() while flushing away old data to load
17511751
* the new dataset received by the master and by discardTempDb()
17521752
* after loading succeeded or failed. */
17531753
void replicationEmptyDbCallback(dict *d) {

0 commit comments

Comments
 (0)