Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches: [main]
pull_request:

# A new push to a PR cancels its older runs. Pushes to main get a unique
# group (the run id), so they are never cancelled or queued behind each other.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build-linux:
strategy:
Expand Down Expand Up @@ -563,9 +569,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# macos-15-intel = Intel (x86_64, /usr/local); macos-15 / macos-26 =
# macos-15-intel = Intel (x86_64, /usr/local); macos-26 / macos-27 =
# Apple Silicon (arm64, /opt/homebrew).
os: ['macos-15-intel', 'macos-15', 'macos-26']
os: ['macos-15-intel', 'macos-26', 'xcode-27' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ clients concurrently.

## Quick start

Tested continuously on **Ubuntu 22.04 / 24.04 / 26.04** and **macOS 15 / 26** (Intel and Apple
Tested continuously on **Ubuntu 22.04 / 24.04 / 26.04** and **macOS 15 / 26 / 27** (Intel and Apple
Silicon). Other Linux distributions generally work as well.

On Ubuntu you can install a prebuilt package instead of building from source (replace `24.04`
Expand Down
15 changes: 2 additions & 13 deletions Tools/DFS/cli/cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,16 @@ class Duration {
timespec c;
public:

#if (_POSIX_C_SOURCE >= 199309L)
void start() {
clock_gettime(CLOCK_REALTIME, &c);
}

double measureMS() {
timespec stopped;
clock_gettime(CLOCK_REALTIME, &stopped);
return (stopped.tv_sec - c.tv_sec) + (stopped.tv_nsec - c.tv_nsec)
/ 1E9;
return (stopped.tv_sec - c.tv_sec) * 1E3
+ (stopped.tv_nsec - c.tv_nsec) / 1E6;
}
#else
void start(){

}

double measureMS(){
return -1.0;
}
#endif


};

Expand Down
5 changes: 3 additions & 2 deletions Tools/DFS/commlayer/EndpointClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <netinet/in.h>
#include <netdb.h>
#include <iostream>
#include <vector>
#include <errno.h>
#include "RemoteCommandBuilder.h"

Expand Down Expand Up @@ -120,8 +121,8 @@ Str EndpointClient::sendSyncMessage(URI uri, const Str &msg, bool doEnvelope) {
}

int ibufsize = buffersize;
char ibuf[ibufsize];
bzero(ibuf, ibufsize);
std::vector<char> ibufStorage(ibufsize);
char* ibuf = ibufStorage.data();

if (canDebug) debug("Hole Serveranwort...");
Str result;
Expand Down
2 changes: 1 addition & 1 deletion Tools/DFS/commlayer/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void WebServer::listen() {
::listen(sockfd, 5);

clilen = sizeof(cli_addr);
int bufsize = 65536;
const int bufsize = 65536;
char buf[bufsize];

//auf clients warten
Expand Down
5 changes: 3 additions & 2 deletions Tools/DFS/commlayer/comm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <netinet/in.h>
#include <netdb.h>
#include <iostream>
#include <vector>

using namespace std;

Expand Down Expand Up @@ -109,8 +110,8 @@ void Endpoint::listen() {

if (canDebug) debug("prepare data exchange with client");

char buffer[bufsize];
bzero(buffer, bufsize);
std::vector<char> bufferStorage(bufsize);
char* buffer = bufferStorage.data();
Str input;
int totalReceived = 0;
if (canDebug) debug("fetching data from client");
Expand Down
1 change: 0 additions & 1 deletion Tools/DFS/datanode/DataNodeClientHandlerFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ DataNodeClientHandlerFactory::DataNodeClientHandlerFactory(
const DataNode *dataNode, int maxHandlerCount, dfs::log::Logger *l) {
this->maxHandlerCount = maxHandlerCount;
this->logger = l;
// this->nodeState = nodeState; // self assignment: makes no sense
this->dataNode = dataNode;
this->freeHandlerId = 0;
this->maxHandlerCount = 8;
Expand Down
1 change: 0 additions & 1 deletion Tools/DFS/datanode/DataNodeClientHandlerFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ namespace dfs {
const DataNode *dataNode;
DataNodeClientHandler *handlers;
dfs::log::Logger *logger;
State *nodeState;

void debug(const Str &s) {
logger->debug(s);
Expand Down
6 changes: 4 additions & 2 deletions Tools/DFS/shared/FigureSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "FigureSystem.h"

#include <vector>

using namespace dfs;

const char *figures = "0123456789abcdefghijklmnopqrstuvwxyz";
Expand Down Expand Up @@ -69,12 +71,12 @@ void FigureSystem::refactor() {
}

Str FigureSystem::toStr() {
char tmp[base];
std::vector<char> tmp(length);
for (int i = 0; i < length; i++) {
unsigned char v = (unsigned char) values[i];
tmp[length - i - 1] = figures[v];
}
return Str(tmp, length);
return Str(tmp.data(), length);
}

void FigureSystem::fromStr(const Str &strValue) {
Expand Down
2 changes: 1 addition & 1 deletion Tools/DFS/shared/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#if (_POSIX_C_SOURCE < 200112L)
int posix_fallocate(int fd, off_t offset, off_t len){
size_t bs = len<4096?len:4096;
const size_t bs = 4096;
char buffer[bs];
memset(buffer, 0, bs);
size_t remaining = len;
Expand Down
1 change: 1 addition & 0 deletions Tools/DFS/shared/str.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ namespace dfs {
*/
class SerializeAble {
public:
virtual ~SerializeAble() {}
virtual void serializeTo(ToStrSerializer &serializer) const = 0;
};

Expand Down
Loading