Cleanup: Get rid of server.core_propagates (#11572)
1. Get rid of server.core_propagates - we can just rely on module/call nesting levels 2. Rename in_nested_call to execution_nesting and update the comment 3. Remove module_ctx_nesting (redundant, we can use execution_nesting) 4. Modify postExecutionUnitOperations according to the comment (The main purpose of this PR) 5. trackingHandlePendingKeyInvalidations: Check the nesting level inside this function
This commit is contained in:
@@ -219,4 +219,4 @@ start_cluster 3 0 [list config_lines $modules] {
|
||||
assert_equal {PONG} [$node2 PING]
|
||||
assert_equal {PONG} [$node3 PING]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,8 +675,10 @@ tags "modules" {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tags "modules aof" {
|
||||
test {Modules RM_Replicate replicates MULTI/EXEC correctly} {
|
||||
foreach aofload_type {debug_cmd startup} {
|
||||
test "Modules RM_Replicate replicates MULTI/EXEC correctly: AOF-load type $aofload_type" {
|
||||
start_server [list overrides [list loadmodule "$testmodule"]] {
|
||||
# Enable the AOF
|
||||
r config set appendonly yes
|
||||
@@ -690,11 +692,34 @@ tags "modules aof" {
|
||||
r propagate-test.mixed
|
||||
r exec
|
||||
|
||||
assert_equal [r get counter-1] {}
|
||||
assert_equal [r get counter-2] {}
|
||||
assert_equal [r get using-call] 2
|
||||
assert_equal [r get after-call] 2
|
||||
assert_equal [r get notifications] 4
|
||||
|
||||
# Load the AOF
|
||||
r debug loadaof
|
||||
if {$aofload_type == "debug_cmd"} {
|
||||
r debug loadaof
|
||||
} else {
|
||||
r config rewrite
|
||||
restart_server 0 true false
|
||||
wait_done_loading r
|
||||
}
|
||||
|
||||
# This module behaves bad on purpose, it only calls
|
||||
# RM_Replicate for counter-1 and counter-2 so values
|
||||
# after AOF-load are different
|
||||
assert_equal [r get counter-1] 4
|
||||
assert_equal [r get counter-2] 4
|
||||
assert_equal [r get using-call] 2
|
||||
assert_equal [r get after-call] 2
|
||||
# 4+4+2+2 commands from AOF (just above) + 4 "INCR notifications" from AOF + 4 notifications for these INCRs
|
||||
assert_equal [r get notifications] 20
|
||||
|
||||
assert_equal {OK} [r module unload propagate-test]
|
||||
assert_equal [s 0 unexpected_error_replies] 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user