Skip to content

Commit

Permalink
Merge pull request #44 from aerospike/stage
Browse files Browse the repository at this point in the history
1.1.0 Release
  • Loading branch information
vmsachin authored Jun 5, 2024
2 parents 65ff09d + 116341f commit c996f0b
Show file tree
Hide file tree
Showing 14 changed files with 2,392 additions and 1,997 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: |
latest_tag=$(git describe --tags --abbrev=0 | sed 's/v//')
if [ -z "$latest_tag" ]; then
echo "::set-output name=tag::1.0.2"
echo "::set-output name=tag::1.1.0"
else
echo "::set-output name=tag::$latest_tag"
fi
Expand All @@ -97,21 +97,21 @@ jobs:
cp pkg/deb/scripts/postinst pkg/deb/aerospike-php-client-deb/DEBIAN/
dpkg-deb --build pkg/deb/aerospike-php-client-deb
cp pkg/deb/aerospike-php-client-deb.deb pkg/deb/aerospike-php-client-1.0.2-x86_64.deb
cp pkg/deb/aerospike-php-client-deb.deb pkg/deb/aerospike-php-client-1.0.2-aarch64.deb
cp pkg/deb/aerospike-php-client-deb.deb pkg/deb/aerospike-php-client-${{ steps.get_tag.outputs.tag }}-x86_64.deb
cp pkg/deb/aerospike-php-client-deb.deb pkg/deb/aerospike-php-client-${{ steps.get_tag.outputs.tag }}-aarch64.deb
ls pkg/deb/
rm -rf pkg/deb/aerospike-php-client-deb*
- name: Move DEB x86_64 to artifacts
uses: actions/upload-artifact@v2
with:
name: aerospike-php-client-deb-x86_64
path: pkg/deb/aerospike-php-client-1.0.2-x86_64.deb
path: pkg/deb/aerospike-php-client-${{ steps.get_tag.outputs.tag }}-x86_64.deb

- name: Move DEB aarch64 to artifacts
uses: actions/upload-artifact@v2
with:
name: aerospike-php-client-deb-aarch64
path: pkg/deb/aerospike-php-client-1.0.2-aarch64.deb
path: pkg/deb/aerospike-php-client-${{ steps.get_tag.outputs.tag }}-aarch64.deb



74 changes: 52 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,95 @@

All notable changes to this project will be documented in this file.

## [1.1.0] - 2024-06-04
- **Download package**
- https://aerospike.com/download/?software=client-php

- **New Features**:

- [CLIENT-2834] Added support for readTouchTTlPercent to support Aerospike 7.1.
- [CLIENT-2969] Added support for LongValue in KVS service.
- [CLIENT-2989] Added support version check between connection manager and php client.

- **Improvements**:
- [CLIENT-2990] Added support for big records (128 MiB for memory namespaces).

- **Fixes**:

- [CLIENT-2991] Fix deb and rpm post install script.

## [1.0.2] - 2024-05-01
- **Download package**
- https://aerospike.com/download/?software=client-php

- **New Features**:

- [CLIENT-2844] Added support for environment variables and file for the client configuration.
- [CLIENT-2846] Added support for building from deb and rpm packages.


- **Fixes**:

- [CLIENT-2906] Cleaned up the build for Aerospike PHP client and Aerospike connection manager.

## [1.0.1] - 2024-04-16

- **Fixes**
- [CLIENT-2871] Set `durable_delete` to `false` by default
- [CLIENT-2871] Set `durable_delete` to `false` by default.


## [1.0.0] - 2024-03-28

This will be the GA release for Aerospike PHP Client v1.0.0
This will be the GA release for Aerospike PHP Client v1.0.0.

- **New Features**:

- Added support for Scan and Query
- Added support for UDF
- Added support for CDT
- Added support for authentication and security
- Added AerospikeExcetpions
- Added benchmarks
- Added support for Scan and Query.
- Added support for UDF.
- Added support for CDT.
- Added support for authentication and security.
- Added AerospikeExcetpions.
- Added benchmarks.

- **Improvements**:

- Added more unit tests
- Cleaned up the build for Aerospike connection manager
- Added more unit tests.
- Cleaned up the build for Aerospike connection manager.


## [0.5.0] - 2024-02-21

- **New Features**:

- Added aerospike connection manager
- Supports server v7
- Added aerospike connection manager.
- Supports server v7.

## [0.4.0] - 2023-12-04

- **Improvements**:

- Authentication performance issue has been fixed
- Added and fixed Unit tests
- Authentication performance issue has been fixed.
- Added and fixed Unit tests.

## [0.3.0] - 2023-11-16

- **Improvements**:

- Authentication issue has been fixed
- Support aerospike server 6.3
- Fixed build failure for ARM platform
- Authentication issue has been fixed.
- Support aerospike server 6.3.
- Fixed build failure for ARM platform.

## [0.2.0] - 2023-10-25

- **New Features**:

- Introduce dedicated namespace "Aerospike"
- Added support for all PHP versions above 8
- Introduce dedicated namespace "Aerospike".
- Added support for all PHP versions above 8.

- **Improvements**:

- Added phpunit tests
- Minor code cleanups and security improvements
- Added phpunit tests.
- Minor code cleanups and security improvements.

- **Update**:

Expand All @@ -69,4 +99,4 @@ This will be the GA release for Aerospike PHP Client v1.0.0

## [0.1.0] - 2023-09-15

- Initial Release.
- Initial Release.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[package]
name = "aerospike_php"
version = "1.0.0"
version = "1.1.0"
edition = "2021"
authors = ["Khosrow Afroozeh <[email protected]>", "Sachin Venkatesha Murthy <[email protected]>"]

[lib]
crate-type = ["cdylib"]

[dependencies]
version-compare = "0.2.0"
ordered-float = { version = "3", default-features = false }
ext-php-rs = "0.12.0"
colored = "2.0.0"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ test-dev: install-dev
./vendor/phpunit/phpunit/phpunit tests/

test: install
@which phpunit > /dev/null || (echo "PHPUnit is not installed. Please install PHPUnit before running tests." && exit 1)
phpunit tests/
@which phpunit > /dev/null || (echo "PHPUnit is not installed. Please install PHPUnit before running tests." && exit 1)
phpunit tests/

clean:
cargo clean
46 changes: 46 additions & 0 deletions aerospike-connection-manager/asld_kvs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,23 @@ message ReadPolicy {
// Write commands are not affected by this setting, because all writes are directed
// to the node containing the key's master partition.
ReplicaPolicy replicaPolicy = 12;

// ReadTouchTTLPercent determines how record TTL (time to live) is affected on reads. When enabled, the server can
// efficiently operate as a read-based LRU cache where the least recently used records are expired.
// The value is expressed as a percentage of the TTL sent on the most recent write such that a read
// within this interval of the record’s end of life will generate a touch.
//
// For example, if the most recent write had a TTL of 10 hours and read_touch_ttl_percent is set to
// 80, the next read within 8 hours of the record's end of life (equivalent to 2 hours after the most
// recent write) will result in a touch, resetting the TTL to another 10 hours.
//
// Values:
//
// 0 : Use server config default-read-touch-ttl-pct for the record's namespace/set.
// -1 : Do not reset record TTL on reads.
// 1 - 100 : Reset record TTL on reads when within this percentage of the most recent write TTL.
// Default: 0
int32 readTouchTTLPercent = 13;
}

// Write policy attributes used in write database commands that are not part of
Expand Down Expand Up @@ -398,6 +415,23 @@ message BatchReadPolicy {

// ReadModeSC indicates read policy for SC (strong consistency) namespaces.
ReadModeSC readModeSC = 3;

// ReadTouchTTLPercent determines how record TTL (time to live) is affected on reads. When enabled, the server can
// efficiently operate as a read-based LRU cache where the least recently used records are expired.
// The value is expressed as a percentage of the TTL sent on the most recent write such that a read
// within this interval of the record’s end of life will generate a touch.
//
// For example, if the most recent write had a TTL of 10 hours and read_touch_ttl_percent is set to
// 80, the next read within 8 hours of the record's end of life (equivalent to 2 hours after the most
// recent write) will result in a touch, resetting the TTL to another 10 hours.
//
// Values:
//
// 0 : Use server config default-read-touch-ttl-pct for the record's namespace/set.
// -1 : Do not reset record TTL on reads.
// 1 - 100 : Reset record TTL on reads when within this percentage of the most recent write TTL.
// Default: 0
int32 readTouchTTLPercent = 4;
}

// BatchWritePolicy attributes used in batch write commands.
Expand Down Expand Up @@ -1222,8 +1256,20 @@ message AerospikeQueryRequest {
optional PartitionFilter partitionFilter = 5;
}

message AerospikeVersionRequest {
}

message AerospikeVersionResponse {
string version = 1;
}


// Aerospike KVS operations service
service KVS {
rpc Version (AerospikeVersionRequest) returns
(AerospikeVersionResponse) {}


// Put a single record
rpc Put (AerospikePutRequest) returns
(Error) {}
Expand Down
18 changes: 15 additions & 3 deletions aerospike-connection-manager/kvs.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ type server struct {
logger slog.Logger
}

func (s *server) Version(ctx context.Context, _ *pb.AerospikeVersionRequest) (*pb.AerospikeVersionResponse, error) {
return &pb.AerospikeVersionResponse{
Version: version,
}, nil
}

func (s *server) Get(ctx context.Context, in *pb.AerospikeGetRequest) (*pb.AerospikeSingleResponse, error) {
policy := toReadPolicy(in.Policy)
key := toKey(in.Key)
Expand Down Expand Up @@ -694,6 +700,7 @@ func toReadPolicy(in *pb.ReadPolicy) *aero.BasePolicy {
SendKey: in.SendKey,
UseCompression: in.UseCompression,
ReplicaPolicy: aero.ReplicaPolicy(in.ReplicaPolicy),
ReadTouchTTLPercent: in.ReadTouchTTLPercent,
}
}
return nil
Expand Down Expand Up @@ -780,9 +787,10 @@ func toBatchPolicy(in *pb.BatchPolicy) *aero.BatchPolicy {
func toBatchReadPolicy(in *pb.BatchReadPolicy) *aero.BatchReadPolicy {
if in != nil {
return &aero.BatchReadPolicy{
FilterExpression: toExpression(in.FilterExpression),
ReadModeAP: aero.ReadModeAP(in.ReadModeAP),
ReadModeSC: aero.ReadModeSC(in.ReadModeSC),
FilterExpression: toExpression(in.FilterExpression),
ReadModeAP: aero.ReadModeAP(in.ReadModeAP),
ReadModeSC: aero.ReadModeSC(in.ReadModeSC),
ReadTouchTTLPercent: in.ReadTouchTTLPercent,
}
}
return nil
Expand Down Expand Up @@ -1702,6 +1710,8 @@ func fromValue(in any) *pb.Value {
return &pb.Value{V: &pb.Value_Nil{Nil: true}}
case aero.IntegerValue:
return &pb.Value{V: &pb.Value_I{I: int64(v)}}
case aero.LongValue:
return &pb.Value{V: &pb.Value_I{I: int64(v)}}
case aero.FloatValue:
return &pb.Value{V: &pb.Value_F{F: float64(v)}}
case aero.StringValue:
Expand Down Expand Up @@ -1748,6 +1758,8 @@ func toExpression(in *pb.Expression) *aero.Expression {
return aero.ExpNilValue()
case aero.IntegerValue:
return aero.ExpIntVal(int64(v))
case aero.LongValue:
return aero.ExpIntVal(int64(v))
case aero.FloatValue:
return aero.ExpFloatVal(float64(v))
case aero.StringValue:
Expand Down
4 changes: 3 additions & 1 deletion aerospike-connection-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var (
lastCommit time.Time
)

// TODO: Add the version command to the KVS server
// TODO: Finish logging and make sure logs have prefixes for different clusters

func main() {
Expand Down Expand Up @@ -124,6 +123,9 @@ func launchServer(name string, ac *client.AerospikeConfig) {
}

srv := grpc.NewServer(
// set the maximum message size possible for a record: 128MiB for memory namespaces, with overhead
grpc.MaxRecvMsgSize(130*1024*1024),
grpc.MaxSendMsgSize(130*1024*1024),
grpc.ChainUnaryInterceptor(recovery.UnaryServerInterceptor(recovery.WithRecoveryHandler(grpcPanicRecoveryHandler))),
grpc.ChainStreamInterceptor(recovery.StreamServerInterceptor(recovery.WithRecoveryHandler(grpcPanicRecoveryHandler))),
)
Expand Down
Loading

0 comments on commit c996f0b

Please sign in to comment.