Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: spop binlog , rewritten as srem #2541

Merged
merged 8 commits into from
Mar 22, 2024

Conversation

chenbt-hz
Copy link
Collaborator

fix: #2407

@github-actions github-actions bot added the ☢️ Bug Something isn't working label Mar 21, 2024
@chenbt-hz
Copy link
Collaborator Author

验证记录

9222端口为master
9223端口为slave

命令执行正常

image

从节点同步正常

image
image

include/pika_set.h Outdated Show resolved Hide resolved
@AlexStocks
Copy link
Collaborator

跟 显荣 问下,怎么补充一个 go test

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Ask Xianrong how to add a go test

@Mixficsol
Copy link
Collaborator

pika/tests/integration/set_test.go 路径下,可以按照下面的例子补充一下测试样例:

		It("should SRem", func() {
			sAdd := client.SAdd(ctx, "set", "one")
			Expect(sAdd.Err()).NotTo(HaveOccurred())
			sAdd = client.SAdd(ctx, "set", "two")
			Expect(sAdd.Err()).NotTo(HaveOccurred())
			sAdd = client.SAdd(ctx, "set", "three")
			Expect(sAdd.Err()).NotTo(HaveOccurred())

			sRem := client.SRem(ctx, "set", "one")
			Expect(sRem.Err()).NotTo(HaveOccurred())
			Expect(sRem.Val()).To(Equal(int64(1)))

			sRem = client.SRem(ctx, "set", "four")
			Expect(sRem.Err()).NotTo(HaveOccurred())
			Expect(sRem.Val()).To(Equal(int64(0)))

			sMembers := client.SMembers(ctx, "set")
			Expect(sMembers.Err()).NotTo(HaveOccurred())
			Expect(sMembers.Val()).To(ConsistOf([]string{"three", "two"}))

			sRem = client.SRem(ctx, "nonexistent_set", "one")
			Expect(sRem.Err()).NotTo(HaveOccurred())
			Expect(sRem.Val()).To(Equal(int64(0)))
		})

@github-actions github-actions bot added the 📒 Documentation Improvements or additions to documentation label Mar 22, 2024
@chenbt-hz
Copy link
Collaborator Author

跟 显荣 问下,怎么补充一个 go test

已添加。测试截图如下
image

@Mixficsol
Copy link
Collaborator

跟 显荣 问下,怎么补充一个 go test

已添加。测试截图如下 image

LGTM

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Ask Xianrong how to add a go test

Added. The test screenshot is as follows![image](https://private-user-images.githubusercontent.com/34958405/315877150-1bca94ae-3b80-4adc-a54b-b03f442ffd5c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOi JnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTEwOTYwMjcsIm5iZiI6MTcxMTA5NTcyNywicGF0aCI6Ii8zNDk1ODQwNS8zMTU4 NzcxNTAtMWJjYTk0YWUtM2I4MC00YWRjLWE1NGItYjAzZjQ0MmZmZDVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpB JTJGMjAyNDAzMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzIyVDA4MjIwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1MzJkYm FjNTg3YjAwOWVkOWNlZjQ5MmVmYzU2N2U3MWRjODI0YTY0NDlmZTFhMjZkODFmYmRkYmVkMzgwNmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZ D0wIn0.ypCMIUXIOjWLpHWJAIPJ2lT4pCJZ3eNU6n-rEU95CSk)

LGTM

@luky116 luky116 merged commit 373dbd5 into OpenAtomFoundation:unstable Mar 22, 2024
12 checks passed
chejinge pushed a commit that referenced this pull request Apr 7, 2024
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this pull request Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.5.4 4.0.0 ☢️ Bug Something isn't working 📒 Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: When writing to the binlog, the spop command needs to be rewritten as srem
6 participants