diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp
index 010df3b9d..e4a31ba28 100644
--- a/controller/PostgreSQL.cpp
+++ b/controller/PostgreSQL.cpp
@@ -780,11 +780,25 @@ void PostgreSQL::initializeNetworks()
fprintf(stderr, "adding networks to redis...\n");
if (_rc->clusterMode) {
auto tx = _cluster->transaction(_myAddressStr, true, false);
- tx.sadd(setKey, networkSet.begin(), networkSet.end());
+ uint64_t count = 0;
+ for (std::string nwid : networkSet) {
+ tx.sadd(setKey, nwid);
+ if (++count % 30000 == 0) {
+ tx.exec();
+ tx = _cluster->transaction(_myAddressStr, true, false);
+ }
+ }
tx.exec();
} else {
auto tx = _redis->transaction(true, false);
- tx.sadd(setKey, networkSet.begin(), networkSet.end());
+ uint64_t count = 0;
+ for (std::string nwid : networkSet) {
+ tx.sadd(setKey, nwid);
+ if (++count % 30000 == 0) {
+ tx.exec();
+ tx = _redis->transaction(true, false);
+ }
+ }
tx.exec();
}
fprintf(stderr, "done.\n");
@@ -1005,14 +1019,24 @@ void PostgreSQL::initializeMembers()
fprintf(stderr, "Load member data into redis...\n");
if (_rc->clusterMode) {
auto tx = _cluster->transaction(_myAddressStr, true, false);
+ uint64_t count = 0;
for (auto it : networkMembers) {
tx.sadd(it.first, it.second);
+ if (++count % 30000 == 0) {
+ tx.exec();
+ tx = _cluster->transaction(_myAddressStr, true, false);
+ }
}
tx.exec();
} else {
auto tx = _redis->transaction(true, false);
+ uint64_t count = 0;
for (auto it : networkMembers) {
tx.sadd(it.first, it.second);
+ if (++count % 30000 == 0) {
+ tx.exec();
+ tx = _redis->transaction(true, false);
+ }
}
tx.exec();
}
diff --git a/make-linux.mk b/make-linux.mk
index bfa416aa0..97ff6215e 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -71,7 +71,7 @@ else
override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
CXXFLAGS?=-O3 -fstack-protector
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
- LDFLAGS=-pie -Wl,-z,relro,-z,now
+ LDFLAGS?=-pie -Wl,-z,relro,-z,now
ZT_CARGO_FLAGS=--release
endif
diff --git a/make-mac.mk b/make-mac.mk
index 018fb8325..7af200adc 100644
--- a/make-mac.mk
+++ b/make-mac.mk
@@ -1,8 +1,8 @@
CC=clang
CXX=clang++
-TOPDIR=$(shell PWD)
+TOPDIR=$(shell pwd)
-INCLUDES=-I$(shell PWD)/rustybits/target -isystem $(TOPDIR)/ext -I$(TOPDIR)/ext/prometheus-cpp-lite-1.0/core/include -I$(TOPDIR)/ext-prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include -I$(TOPDIR)/ext/prometheus-cpp-lite-1.0/simpleapi/include
+INCLUDES=-I$(shell pwd)/rustybits/target -isystem $(TOPDIR)/ext -I$(TOPDIR)/ext/prometheus-cpp-lite-1.0/core/include -I$(TOPDIR)/ext-prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include -I$(TOPDIR)/ext/prometheus-cpp-lite-1.0/simpleapi/include
DEFS=
LIBS=
ARCH_FLAGS=-arch x86_64 -arch arm64
diff --git a/pkg/synology/dsm7-docker/README.md b/pkg/synology/dsm7-docker/README.md
index 14bacde76..99cd979cf 100644
--- a/pkg/synology/dsm7-docker/README.md
+++ b/pkg/synology/dsm7-docker/README.md
@@ -1,3 +1,8 @@
## Docker image for Synology's DSM7
Documentation: [docs.zerotier.com/devices/synology](https://docs.zerotier.com/devices/synology)
+
+### Build & Push changes to DockerHub
+```shell
+./build.sh build
+```
diff --git a/pkg/synology/dsm7-docker/build.sh b/pkg/synology/dsm7-docker/build.sh
index acec5e0c9..1706ac686 100755
--- a/pkg/synology/dsm7-docker/build.sh
+++ b/pkg/synology/dsm7-docker/build.sh
@@ -3,19 +3,17 @@
ZTO_VER=$(git describe --tags $(git rev-list --tags --max-count=1))
ZTO_COMMIT=$(git rev-parse HEAD)
-build()
-{
- sudo docker build --load --rm -t zerotier-synology . --build-arg ZTO_COMMIT=${ZTO_COMMIT} --build-arg ZTO_VER=${ZTO_VER}
- LATEST_DOCKER_IMAGE_HASH=$(sudo docker images -q zerotier-synology)
- sudo docker tag ${LATEST_DOCKER_IMAGE_HASH} zerotier/zerotier-synology:${ZTO_VER}
- sudo docker tag ${LATEST_DOCKER_IMAGE_HASH} zerotier/zerotier-synology:latest
-}
-
-push()
-{
+build() {
sudo docker login --username=${DOCKERHUB_USERNAME}
- sudo docker push zerotier/zerotier-synology:${ZTO_VER}
- sudo docker push zerotier/zerotier-synology:latest
+
+ sudo docker buildx build \
+ --push \
+ --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
+ --tag zerotier/zerotier-synology:${ZTO_VER} \
+ --tag zerotier/zerotier-synology:latest \
+ --build-arg ZTO_COMMIT=${ZTO_COMMIT} \
+ --build-arg ZTO_VER=${ZTO_VER} \
+ .
}
"$@"
diff --git a/rustybits/zeroidc.vcxproj b/rustybits/zeroidc.vcxproj
index b31ed0ee4..833437238 100644
--- a/rustybits/zeroidc.vcxproj
+++ b/rustybits/zeroidc.vcxproj
@@ -91,7 +91,7 @@
cargo clean
- cargo clean & cargo build --release --target=x86_64-pc-windows-msvc
+ cargo clean & cargo build -p zeroidc --release --target=x86_64-pc-windows-msvc
NDEBUG;$(NMakePreprocessorDefinitions)