Skip to content

Commit

Permalink
Mas hmmr updated d32 (#1114)
Browse files Browse the repository at this point in the history
Broad array of fixes to update relx/rebar3/otp packaging in Riak for Release 3.2.0.

Co-authored-by: Andrei Zavada <[email protected]>
Co-authored-by: Andrei Zavada <[email protected]>
  • Loading branch information
3 people authored Dec 28, 2022
1 parent 8c01e8f commit 812ded6
Show file tree
Hide file tree
Showing 63 changed files with 1,599 additions and 1,380 deletions.
51 changes: 31 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ PKG_REVISION ?= $(shell git describe --tags 2>/dev/null)
PKG_BUILD = 1
BASE_DIR = $(shell pwd)
ERLANG_BIN = $(shell dirname $(shell which erl 2>/dev/null) 2>/dev/null)
OTP_VER = $(shell echo $(ERLANG_BIN) | rev | cut -d "/" -f 2 | rev)
OTP_VER = $(shell erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell)
REBAR ?= $(BASE_DIR)/rebar3
OVERLAY_VARS ?=
TEST_IGNORE ?= lager riak basho_bench
TEST_IGNORE ?= riak basho_bench
TEST_DEPS_DIR ?= _build/test/lib
REL_DIR ?= _build/default/rel
DEPS = $(patsubst $(TEST_DEPS_DIR)/%, %, $(wildcard $(TEST_DEPS_DIR)/*))
Expand All @@ -21,21 +21,17 @@ export EXOMETER_PACKAGES

$(if $(ERLANG_BIN),,$(warning "Warning: No Erlang found in your path, this will probably not work"))

.PHONY: rel stagedevrel deps
.PHONY: rel stagedevrel

all: deps compile
all: compile

compile:
$(REBAR) compile

deps:
$(if $(HEAD_REVISION),$(warning "Warning: you have checked out a tag ($(HEAD_REVISION)) and should use the compile target"))
$(REBAR) upgrade

clean: testclean
$(REBAR) clean

distclean: clean devclean relclean ballclean
distclean: clean devclean relclean
@rm -rf _build

##
Expand Down Expand Up @@ -74,20 +70,35 @@ test : testclean eunit test-deps
## Release targets
##
rel: compile
$(REBAR) as rel release
cp -a _build/rel/rel/riak rel/
@$(REBAR) as rel release
# freebsd tar won't write to stdout, so:
@tar -c -f rel.tar --exclude '*/.git/*' -C _build/rel/rel riak && tar -x -f rel.tar -C rel && rm rel.tar

rel-rpm: compile
$(REBAR) as rpm release
cp -a _build/rpm/rel/riak rel/
@$(REBAR) as rpm release
@tar --exclude-vcs -c -C _build/rpm/rel riak | tar -x -C rel

rel-deb: compile
$(REBAR) as deb release
cp -a _build/deb/rel/riak rel/
@$(REBAR) as deb release
@tar --exclude-vcs -c -C _build/deb/rel riak | tar -x -C rel

rel-osx: compile
@$(REBAR) as osx release
@tar --exclude-vcs -c -C _build/osx/rel riak | tar -x -C rel

# this one is to be called from an external make (not from rel/pkg/Makefile)
rel-alpine: compile
@$(REBAR) as alpine release
@(cd _build/alpine/rel/riak/usr/bin && mv riak-nosu riak)
@tar --exclude-vcs -c -C _build/alpine/rel riak | tar -x -C rel

rel-fbsdng: compile
@$(REBAR) as fbsdng release
@tar -c -f rel.tar --exclude '*/.git/*' -C _build/fbsdng/rel riak && tar -x -f rel.tar -C rel && rm rel.tar

relclean:
rm -rf $(REL_DIR)
rm -rf rel/riak
@rm -rf $(REL_DIR)
@rm -rf rel/riak rel/.libs rel/.deps

##
## Developer targets
Expand Down Expand Up @@ -123,7 +134,7 @@ perfdev : all
mkdir -p perfdev
rel/gen_dev $@ rel/vars/perf_vars.config.src rel/vars/perf_vars.config
(cd rel && ../rebar generate target_dir=../perfdev overlay_vars=vars/perf_vars.config)
$(foreach dep,$(wildcard deps/*), rm -rf perfdev/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) perfdev/lib;)
$(foreach dep,$(wildcard _build/default/lib/*), rm -rf perfdev/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) perfdev/lib;)

perf:
perfdev/bin/riak stop || :
Expand All @@ -136,7 +147,7 @@ devclean: clean
rm -rf dev

stage : rel
$(foreach dep,$(wildcard deps/*), rm -rf rel/riak/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) rel/riak/lib;)
$(foreach dep,$(wildcard _build/default/lib/*), rm -rf rel/riak/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) rel/riak/lib;)

##
## Doc targets
Expand Down Expand Up @@ -231,7 +242,7 @@ PKG_ID := "$(REPO_TAG)-OTP$(OTP_VER)"
PKG_VERSION = $(shell echo $(PKG_ID) | sed -e 's/^$(REPO)-//')

package:
mkdir rel/pkg/out/riak-$(PKG_ID)
mkdir -p rel/pkg/out/$(PKG_ID)
git archive --format=tar HEAD | gzip >rel/pkg/out/$(PKG_ID).tar.gz
$(MAKE) -f rel/pkg/Makefile

Expand Down
38 changes: 38 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
# Riak KV 3.2.0 Release Notes

This release is an OTP uplift release. Whereas release 3.0.n supports OTP 20 and OTP 22; the intention is for Release 3.2.n to support OTP 22, OTP 24, and OTP 25. There are notable potential throughput benefits of around 5% when using OTP 24/25 rather than OTP 22 where load is CPU bound. OTP 24 is currently the preferred platform for this release.

As part of this change, the [lager](https://github.com/erlang-lager/lager) dependancy has been removed, with OTP's internal [logger](https://www.erlang.org/doc/apps/kernel/logger_chapter.html) used instead. Any logging configuration should be updated as a part of the migrtaion, using the new options made available via [riak.conf](https://github.com/basho/riak/blob/0b5f9f1681352709c8312b2de7b7697c7b62a957/priv/riak.schema#L3-L70).

There has been a significant overhaul of the release scripts in order to adopt changes within [relx](https://github.com/erlware/relx). Note that due to the updates in relx, `riak daemon` should be used instead of `riak start`. Some riak and riak-admin commands may also now return an additional `ok` output. Going forward, both `riak admin` and `riak-admin` should work for admin commands.

Note that this release of Riak is packaged with a bespoke build of [rebar3](https://github.com/martinsumner/rebar3/tree/mas-alternative_deprecation_warning), this alters mainstream rebar3/relx to allow us control over deprecation warnings in relx.

Packaging suport has now been added for Alpine Linux and FreeBSD.

When building from source, the `snappy` dependancy is now made rather than fetched using a cached package, so support for `cmake` is required to build. Note that on older versions of OSX the current version of snappy will not compile. This will be resolved when their is a formal release version of snappy containing [this fix](https://github.com/google/snappy/commit/8dd58a519f79f0742d4c68fbccb2aed2ddb651e8).

# Riak KV 3.0.12 Release Notes

This is a general release of changes and fixes:

- A [fix to a critical issue with the use of PR variables](https://github.com/basho/riak_kv/pull/1836) in Riak KV (when the PR value is set via bucket properties).

- Changes to the leveled backend with the aim of further improving memory management, by simplifying the [summary tree within each leveled_sst file](https://github.com/martinsumner/leveled/pull/383).

- An [update to leveldb snappy compression](https://github.com/basho/eleveldb/pull/267), to make Riak compatible with a broader set of platforms (including AWS Graviton). Because of this change, anyone building from source will now require `cmake` to be installed.

- A [new `reip_manual` console command](https://github.com/basho/riak/pull/1122) has been added to use as an alternative to `reip`, which does not currently work in the 3.0 release stream. Use `riak admin reip_manual` in place of `riak admin reip` when performing the reip operation on a node. This now requires that the path to the ring file, and the cluster name, to be known by the operator.

- Some [improvements to logging within the leveled backend](https://github.com/martinsumner/leveled/pull/385) have been made to allow for better statistics monitoring of low-level operations, and reduce the cost of writing a log within leveled.

- A fix for a deadlock issue in [riak_repl AAE fullsync](https://github.com/basho/riak_repl/pull/818) to help when clusters with high object counts have large deltas.

- [Two](https://github.com/basho/riak_kv/pull/1839) [other](https://github.com/basho/riak_kv/pull/1837) fixes within Riak KV.

As part of this release, further testing of the new memory configuration options added in Riak 3.0.10 has been undertaken. It is now recommended when using the leveled backend, that if memory growth in the Riak process is a signifcant concern, then the following configuration option may be tested: `erlang.eheap_memory.sbct = 128`. This has been shown to reduce the memory footprint of Riak, with a small performance overhead.

# Riak KV 3.0.11 Release Notes

A simple change to [release a bottleneck](https://github.com/martinsumner/leveled/issues/379) in 2i queries with the leveled backend. Should only be relevant to those using leveled, and attempting o(1000) 2i queries per second.

# Riak KV 3.0.10 Release Notes

This release is focused on improving memory management, especially with the leveled backend, and improving the efficiency and ease of configuration of tictacaae full-sync.
Expand Down
5 changes: 4 additions & 1 deletion THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ Eli Klein
Endre H
Engel A. Sanchez
Enrique
Enrique Fernández
Eric
Eric Cestari
Eric Merritt
Expand Down Expand Up @@ -470,6 +471,7 @@ Pavlo Baron
Pedram Nimreezi
Pedro Larroy
Pentium10
Peter Clark
Peter Garbers
Peter Gribanov
Peter Lemenkov
Expand Down Expand Up @@ -562,6 +564,7 @@ Steve Pulec
Steve Strong
Steve Vinoski
Steve Wight
Steve Wood
Steven Gravell
Susan Potter
Takahiko Sato
Expand Down Expand Up @@ -701,4 +704,4 @@ xcurry
ypaq
zhangjiayin
zschlag
Łukasz Milewski
Łukasz Milewski
1 change: 0 additions & 1 deletion apps/riak/src/riak.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
riak,
cuttlefish,
runtime_tools,
lager_syslog,
cluster_info,
riak_kv,
riak_repl,
Expand Down
37 changes: 0 additions & 37 deletions pkg.vars.config

This file was deleted.

Loading

0 comments on commit 812ded6

Please sign in to comment.