Skip to content

Add the missing YCSB entrypoint for SS2PL - #120

Merged
thawk105 merged 1 commit into
masterfrom
ss2pl-ycsb-workload
Aug 26, 2026
Merged

Add the missing YCSB entrypoint for SS2PL#120
thawk105 merged 1 commit into
masterfrom
ss2pl-ycsb-workload

Conversation

@thawk105

Copy link
Copy Markdown
Owner

cc/ss2pl/CMakeLists.txt registered only bomb and tpcc, so no ycsb_ss2pl.exe was ever built and SS2PL could not be measured on YCSB at all. cmake --build <dir> --target ycsb_ss2pl.exe fails with "No rule to make target".

The pre-cmake YCSB main survived as cc/ss2pl/ss2pl.cc, but it is dead code: it is outside the build graph (the ccbench_add_protocol convention picks up <workload>_<protocol>.cc, which it does not match) and it calls the two-argument TxExecutor constructor that no longer exists. Nothing references it, so remove it rather than leave a file that cannot compile.

  • add cc/ss2pl/ycsb_ss2pl.cc, modelled on cc/silo/ycsb_silo.cc and cc/ss2pl/bomb_ss2pl.cc: the shared ccbench::run<TxExecutor, TransactionStatus, YcsbWorkload> runner with the current three-argument factory
  • add ycsb to the protocol's WORKLOADS
  • delete the dead cc/ss2pl/ss2pl.cc
  • mark SS2PL's YCSB column as supported in README.md and in both docs/protocols_ja.md and docs/protocols_en.md (each has a protocol table and a matrix snapshot; the snapshots were checked against a regenerated build/PROTOCOL_MATRIX.md, which is not committed)

Not changed on purpose:

  • cc/ss2pl/util.cc is untouched. chkArg() validates the protocol-local legacy FLAGS_rratio rather than the FLAGS_ycsb_rratio the YCSB workload actually reads, but that mismatch is repo-wide (cc/silo disabled the same check) and fixing it only for this binary would make SS2PL's YCSB entrypoint behave differently from every other one.
  • With ycsb_ss2pl.exe in place, YCSB aborts are counted twice: once in TxExecutor::abort() and once in the workload loop in include/ycsb.hh. That is a pre-existing issue in the shared workload header, not specific to SS2PL, and is left for a separate change.
  • The per-protocol README.md and script/*.sh still refer to the old ss2pl.exe name and positional CLI. The same staleness exists under cc/silo/, so it is out of scope here.

Verified on an Intel Xeon Platinum 8468 (48 physical cores):

  • cmake --build of every protocol with -DCMAKE_BUILD_TYPE=Release, -Wall -Wextra -Werror, under g++ 11.4 and g++ 12
  • ycsb_ss2pl.exe -ycsb_tuple_num=1000000 -ycsb_max_ope=10 -ycsb_rratio=50 -ycsb_zipf_skew=0 -thread_num=48 -extime=5 exits 0 at 7,800,905 tps (abort rate 0.0031)
  • tpcc_ss2pl.exe and bomb_ss2pl.exe are unaffected: their .text sections are byte-identical to a build of the parent commit
  • the clang-format --dry-run --Werror check from .github/workflows/format.yml passes with clang-format 14

GCC 13, which CI uses, was not available on the test machine, so the -Werror result there is unverified.

This change was written with AI assistance.

`cc/ss2pl/CMakeLists.txt` registered only `bomb` and `tpcc`, so no
`ycsb_ss2pl.exe` was ever built and SS2PL could not be measured on YCSB at
all. `cmake --build <dir> --target ycsb_ss2pl.exe` fails with "No rule to
make target".

The pre-cmake YCSB main survived as `cc/ss2pl/ss2pl.cc`, but it is dead
code: it is outside the build graph (the `ccbench_add_protocol` convention
picks up `<workload>_<protocol>.cc`, which it does not match) and it calls
the two-argument `TxExecutor` constructor that no longer exists. Nothing
references it, so remove it rather than leave a file that cannot compile.

- add `cc/ss2pl/ycsb_ss2pl.cc`, modelled on `cc/silo/ycsb_silo.cc` and
  `cc/ss2pl/bomb_ss2pl.cc`: the shared `ccbench::run<TxExecutor,
  TransactionStatus, YcsbWorkload>` runner with the current three-argument
  factory
- add `ycsb` to the protocol's `WORKLOADS`
- delete the dead `cc/ss2pl/ss2pl.cc`
- mark SS2PL's YCSB column as supported in `README.md` and in both
  `docs/protocols_ja.md` and `docs/protocols_en.md` (each has a protocol
  table and a matrix snapshot; the snapshots were checked against a
  regenerated `build/PROTOCOL_MATRIX.md`, which is not committed)

Not changed on purpose:

- `cc/ss2pl/util.cc` is untouched. `chkArg()` validates the protocol-local
  legacy `FLAGS_rratio` rather than the `FLAGS_ycsb_rratio` the YCSB
  workload actually reads, but that mismatch is repo-wide (`cc/silo`
  disabled the same check) and fixing it only for this binary would make
  SS2PL's YCSB entrypoint behave differently from every other one.
- With `ycsb_ss2pl.exe` in place, YCSB aborts are counted twice: once in
  `TxExecutor::abort()` and once in the workload loop in `include/ycsb.hh`.
  That is a pre-existing issue in the shared workload header, not specific
  to SS2PL, and is left for a separate change.
- The per-protocol `README.md` and `script/*.sh` still refer to the old
  `ss2pl.exe` name and positional CLI. The same staleness exists under
  `cc/silo/`, so it is out of scope here.

Verified on an Intel Xeon Platinum 8468 (48 physical cores):

- `cmake --build` of every protocol with `-DCMAKE_BUILD_TYPE=Release`,
  `-Wall -Wextra -Werror`, under g++ 11.4 and g++ 12
- `ycsb_ss2pl.exe -ycsb_tuple_num=1000000 -ycsb_max_ope=10
  -ycsb_rratio=50 -ycsb_zipf_skew=0 -thread_num=48 -extime=5` exits 0 at
  7,800,905 tps (abort rate 0.0031)
- `tpcc_ss2pl.exe` and `bomb_ss2pl.exe` are unaffected: their `.text`
  sections are byte-identical to a build of the parent commit
- the `clang-format --dry-run --Werror` check from
  `.github/workflows/format.yml` passes with clang-format 14

GCC 13, which CI uses, was not available on the test machine, so the
`-Werror` result there is unverified.

This change was written with AI assistance.
@thawk105
thawk105 merged commit 2df99f1 into master Aug 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant