Skip to content

Commit 812ded6

Browse files
martinsumnerAndrei Zavadahmmr
authored
Mas hmmr updated d32 (#1114)
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]>
1 parent 8c01e8f commit 812ded6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1599
-1380
lines changed

Makefile

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ PKG_REVISION ?= $(shell git describe --tags 2>/dev/null)
44
PKG_BUILD = 1
55
BASE_DIR = $(shell pwd)
66
ERLANG_BIN = $(shell dirname $(shell which erl 2>/dev/null) 2>/dev/null)
7-
OTP_VER = $(shell echo $(ERLANG_BIN) | rev | cut -d "/" -f 2 | rev)
7+
OTP_VER = $(shell erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell)
88
REBAR ?= $(BASE_DIR)/rebar3
99
OVERLAY_VARS ?=
10-
TEST_IGNORE ?= lager riak basho_bench
10+
TEST_IGNORE ?= riak basho_bench
1111
TEST_DEPS_DIR ?= _build/test/lib
1212
REL_DIR ?= _build/default/rel
1313
DEPS = $(patsubst $(TEST_DEPS_DIR)/%, %, $(wildcard $(TEST_DEPS_DIR)/*))
@@ -21,21 +21,17 @@ export EXOMETER_PACKAGES
2121

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

24-
.PHONY: rel stagedevrel deps
24+
.PHONY: rel stagedevrel
2525

26-
all: deps compile
26+
all: compile
2727

2828
compile:
2929
$(REBAR) compile
3030

31-
deps:
32-
$(if $(HEAD_REVISION),$(warning "Warning: you have checked out a tag ($(HEAD_REVISION)) and should use the compile target"))
33-
$(REBAR) upgrade
34-
3531
clean: testclean
3632
$(REBAR) clean
3733

38-
distclean: clean devclean relclean ballclean
34+
distclean: clean devclean relclean
3935
@rm -rf _build
4036

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

8077
rel-rpm: compile
81-
$(REBAR) as rpm release
82-
cp -a _build/rpm/rel/riak rel/
78+
@$(REBAR) as rpm release
79+
@tar --exclude-vcs -c -C _build/rpm/rel riak | tar -x -C rel
8380

8481
rel-deb: compile
85-
$(REBAR) as deb release
86-
cp -a _build/deb/rel/riak rel/
82+
@$(REBAR) as deb release
83+
@tar --exclude-vcs -c -C _build/deb/rel riak | tar -x -C rel
84+
85+
rel-osx: compile
86+
@$(REBAR) as osx release
87+
@tar --exclude-vcs -c -C _build/osx/rel riak | tar -x -C rel
88+
89+
# this one is to be called from an external make (not from rel/pkg/Makefile)
90+
rel-alpine: compile
91+
@$(REBAR) as alpine release
92+
@(cd _build/alpine/rel/riak/usr/bin && mv riak-nosu riak)
93+
@tar --exclude-vcs -c -C _build/alpine/rel riak | tar -x -C rel
94+
95+
rel-fbsdng: compile
96+
@$(REBAR) as fbsdng release
97+
@tar -c -f rel.tar --exclude '*/.git/*' -C _build/fbsdng/rel riak && tar -x -f rel.tar -C rel && rm rel.tar
8798

8899
relclean:
89-
rm -rf $(REL_DIR)
90-
rm -rf rel/riak
100+
@rm -rf $(REL_DIR)
101+
@rm -rf rel/riak rel/.libs rel/.deps
91102

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

128139
perf:
129140
perfdev/bin/riak stop || :
@@ -136,7 +147,7 @@ devclean: clean
136147
rm -rf dev
137148

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

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

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

RELEASE-NOTES.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
# Riak KV 3.2.0 Release Notes
2+
3+
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.
4+
5+
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).
6+
7+
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.
8+
9+
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.
10+
11+
Packaging suport has now been added for Alpine Linux and FreeBSD.
12+
13+
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).
14+
15+
# Riak KV 3.0.12 Release Notes
16+
17+
This is a general release of changes and fixes:
18+
19+
- 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).
20+
21+
- 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).
22+
23+
- 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.
24+
25+
- 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.
26+
27+
- 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.
28+
29+
- 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.
30+
31+
- [Two](https://github.com/basho/riak_kv/pull/1839) [other](https://github.com/basho/riak_kv/pull/1837) fixes within Riak KV.
32+
33+
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.
34+
35+
# Riak KV 3.0.11 Release Notes
36+
37+
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.
38+
139
# Riak KV 3.0.10 Release Notes
240

341
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.

THANKS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ Eli Klein
189189
Endre H
190190
Engel A. Sanchez
191191
Enrique
192+
Enrique Fernández
192193
Eric
193194
Eric Cestari
194195
Eric Merritt
@@ -470,6 +471,7 @@ Pavlo Baron
470471
Pedram Nimreezi
471472
Pedro Larroy
472473
Pentium10
474+
Peter Clark
473475
Peter Garbers
474476
Peter Gribanov
475477
Peter Lemenkov
@@ -562,6 +564,7 @@ Steve Pulec
562564
Steve Strong
563565
Steve Vinoski
564566
Steve Wight
567+
Steve Wood
565568
Steven Gravell
566569
Susan Potter
567570
Takahiko Sato
@@ -701,4 +704,4 @@ xcurry
701704
ypaq
702705
zhangjiayin
703706
zschlag
704-
Łukasz Milewski
707+
Łukasz Milewski

apps/riak/src/riak.app.src

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
riak,
1515
cuttlefish,
1616
runtime_tools,
17-
lager_syslog,
1817
cluster_info,
1918
riak_kv,
2019
riak_repl,

pkg.vars.config

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)