Skip to content

Commit

Permalink
fix bug&&change version (OpenAtomFoundation#2141)
Browse files Browse the repository at this point in the history
* fix_bug&&change_version

Co-authored-by: chejinge <chejinge@360.cn>
  • Loading branch information
chejinge and brother-jin committed Nov 22, 2023
1 parent eb36ca1 commit 70c5665
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]
schedule:
- cron: '25 19 * * 6'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Codis

on:
push:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]
pull_request:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Operator

on:
push:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]
pull_request:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pika.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Pika

on:
push:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]
pull_request:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tools_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Tools_go_build

on:
push:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]
paths:
- 'tools/**'
pull_request:
branches: [ "unstable", "3.5.1" ]
branches: [ "unstable", "3.5.2" ]
paths:
- 'tools/**'

Expand Down
2 changes: 1 addition & 1 deletion include/pika_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

#define PIKA_MAJOR 3
#define PIKA_MINOR 5
#define PIKA_PATCH 1
#define PIKA_PATCH 2

#endif // INCLUDE_PIKA_VERSION_H_
2 changes: 1 addition & 1 deletion src/pstd/src/pstd_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ std::string StringTrim(const std::string& ori, const std::string& charlist) {
}
++pos;
}
while (rpos >= 0) {
while (rpos > 0) {
bool meet = false;
for (char c : charlist) {
if (ori.at(rpos) == c) {
Expand Down
1 change: 1 addition & 0 deletions src/pstd/tests/slash_string_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ TEST_F(StringTest, StringTrim) {
ASSERT_EQ(StringTrim(" computer "), "computer");
ASSERT_EQ(StringTrim(" comp uter "), "comp uter");
ASSERT_EQ(StringTrim(" \n computer \n ", "\n "), "computer");
ASSERT_EQ(StringTrim(" \n", "\r\n "), "");
}

TEST_F(StringTest, ParseIpPort) {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/redis_strings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ Status RedisStrings::Setrange(const Slice& key, int64_t start_offset, const Slic
} else {
std::string head = old_value.substr(0, start_offset);
std::string tail;
if (start_offset + value.size() - 1 < old_value.length() - 1) {
if ((start_offset + value.size()) < old_value.length()) {
tail = old_value.substr(start_offset + value.size());
}
new_value = head + value.data() + tail;
Expand Down
16 changes: 16 additions & 0 deletions tests/integration/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,22 @@ var _ = Describe("String Commands", func() {
})

It("should SetRange", func() {
setRes := client.Set(ctx, "nil_key", "", 0)
Expect(setRes.Err()).NotTo(HaveOccurred())
Expect(setRes.Val()).To(Equal("OK"))

getRes := client.Get(ctx, "nil_key")
Expect(getRes.Err()).NotTo(HaveOccurred())
Expect(getRes.Val()).To(Equal(""))

setRangeRes := client.SetRange(ctx, "nil_key", 0, "Pika")
Expect(setRangeRes.Err()).NotTo(HaveOccurred())
Expect(setRangeRes.Val()).To(Equal(int64(4)))

getRes = client.Get(ctx, "nil_key")
Expect(getRes.Err()).NotTo(HaveOccurred())
Expect(getRes.Val()).To(Equal("Pika"))

set := client.Set(ctx, "key_3s", "Hello World", 0)
Expect(set.Err()).NotTo(HaveOccurred())
Expect(set.Val()).To(Equal("OK"))
Expand Down
2 changes: 1 addition & 1 deletion tools/kubeblocks_helm/pika-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application

version: 0.6.0-alpha.21

appVersion: "3.5.1"
appVersion: "3.5.2"

home: https://github.com/OpenAtomFoundation/pika
keywords:
Expand Down
2 changes: 1 addition & 1 deletion tools/kubeblocks_helm/pika/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application

version: 0.6.0-alpha.21

appVersion: "3.5.1"
appVersion: "3.5.2"

home: https://github.com/OpenAtomFoundation/pika
keywords:
Expand Down
8 changes: 4 additions & 4 deletions tools/kubeblocks_helm/pika/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
pika:
version: v3.5.1
version: v3.5.2
image:
pika:
registry: docker.io
repository: pikadb/pika
tag: v3.5.1
tag: v3.5.2
pullPolicy: IfNotPresent
codis:
registry: docker.io
repository: pikadb/codis
tag: v3.5.1
tag: v3.5.2
pullPolicy: IfNotPresent
etcd:
registry: docker.io
Expand Down Expand Up @@ -39,7 +39,7 @@ roleProbe:
periodSeconds: 1
timeoutSeconds: 1

clusterVersionOverride: 3.5.1
clusterVersionOverride: 3.5.2
nameOverride: ""
fullnameOverride: ""

Expand Down

0 comments on commit 70c5665

Please sign in to comment.