forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
Error injections
Artem Starshov edited this page Mar 10, 2021
·
1 revision
It is possible to set errinjs using environment variables(further just env). Create env with the same name as error injection name in errinj.h (e.g.: ERRINJ_TESTING, ERRINJ_WAL_IO and etc.) and assign it to a value satisfied to such rules:
- For boolean error injections "true" or "false" in any case;
- For integer error injections it should be an integer number ("2", "-3" and etc.);
- For double error injections it should be a float number with decimal point as '.' ("2.45", "-2.45");
If value of env breaks the rules above then tarantool
will report it and exit.
NOTE: This function works only in Debug version as error injections at all.
- Correct names:
$ ERRINJ_TESTING=True ERRINJ_WAL_WRITE_PARTIAL=1 ERRINJ_RELAY_TIMEOUT=2.3 tarantool
Tarantool 2.8.0-104-ga801f9f35
type 'help' for interactive help
tarantool> box.error.injection.get('ERRINJ_TESTING')
---
- true
...
tarantool> box.error.injection.get('ERRINJ_WAL_WRITE_PARTIAL')
---
- 1
...
tarantool> box.error.injection.get('ERRINJ_RELAY_TIMEOUT')
---
- 2.3
...
- Incorrect names:
$ ERRINJ_WAL_WRITE_PARTIAL=1e10 tarantool
Incorrect value for integer ERRINJ_WAL_WRITE_PARTIAL: 1e10
$ ERRINJ_RELAY_TIMEOUT=2,3 tarantool
Incorrect value for double ERRINJ_RELAY_TIMEOUT: 2,3
$ ERRINJ_TESTING=Tru tarantool
Incorrect value for boolean ERRINJ_TESTING: Tru
Architecture Specifications
- Server architecture
- Feature specifications
- What's in a good specification
- Functional indexes
- Space _index structure
- R tree index quick start and usage
- LuaJIT
- Vinyl
- SQL
- Testing
- Performance
How To ...?
- ... add new fuzzers
- ... build RPM or Deb package using packpack
- ... calculate memory size
- ... debug core dump of stripped tarantool
- ... debug core from different OS
- ... debug Lua state with GDB
- ... generate new bootstrap snapshot
- ... use Address Sanitizer
- ... collect a coredump
Lua modules
Useful links