Skip to content

Instantly share code, notes, and snippets.

View Matan-B's full-sized avatar

Matan Breizman Matan-B

View GitHub Profile
std::vector<std::pair<librados::bufferlist*, std::unique_ptr<librados::AioCompletion>>> reads;
for (i = 0; i < 100; i++) {
std::cout << "read iteration: " << i << std::endl;
auto& [bl_ok, aiocp] = reads.emplace_back();
aiocp = std::unique_ptr<librados::AioCompletion>(librados::Rados::aio_create_completion());
bl_ok = new librados::bufferlist();
ret = io_ctx.aio_read(object_name, aiocp.get(), bl_ok, read_len, 0);
}
for (auto& [bl, aiocp] : reads) {
std::cout << "wait iteration: " << i << std::endl;
@Matan-B
Matan-B / BUG #49689.md
Last active November 15, 2022 08:33
past_interval start interval mismatch

past_intervals: start interval does not contain the required bound start, Bug #49689

More importantly, we haven't be able to pin down the root cause of this issue. If anyone is able to reproduce this with logs you will be my hero forever! sage

Log files

Error message is:

@Matan-B
Matan-B / 47300.md
Last active May 17, 2022 16:43
BUG #47300

mount.ceph fails to understand AAAA records from SRV record

#47300 IPv6 addresses are enclosed in square brackets [ipv6addr]:port. Adapting from Ipv4 to 6 without taking the brackets in account (while parsing the address) is a common starting point for bugs :)

The reported failure:

server name not found: 2001:db8:2000:8a:ec4:7aff:fe31:d638:6789 (Name or service not known)
failed to resolve source

Building on top of #46062. ASan is enabled by defult in Crimson, which resulted in the InitModule leak. When compiling with ASan both crimson and classic report this leak. This leak seems to be intentional and can be suppressed.

Build tcmalloc ASan
1 - -
2 - x
3 x x
os_type: centos
os_version: 8
flavor: crimson
overrides:
install:
flavor: crimson
ceph:
flavor: crimson
ceph:
flavor: crimson
print('Lua Req1 --> Start')
print("Lua Main --> [op_name] and [nats_connection] are getting values here")
RGW["op_name"] = 7
RGW["nats_connection"] = 513
print('Lua Req1 --> End')
print()
@Matan-B
Matan-B / README.md
Last active July 4, 2021 12:45
RgwScript_readme

Introduction

This directory contains examples on how to use Lua Scripting together with a NATS Lua client to add NATS to the list of bucket notifications endpoints.

NATS

To test your setup:

  • Install NATS and start a nats-server.

  • Subscribe to the NATS server using go-nats-examples repo, choosing the topic to be 'Bucket_Notification' (as defined in the script)

@Matan-B
Matan-B / RgwScript.lua
Last active July 3, 2021 16:47
adapting the GOING NATS PoC
local json = require ("lunajson")
local nats = require ("nats")
function nats_connect()
local nats_params = {
host ='0.0.0.0',
port = 4222,
}
client = nats.connect(nats_params)
client:connect()