Azrenbeth
becb2937aa
Wrapped code with pyo3 so that the libary can be used from python ( #42 )
2021-08-03 09:44:51 +01:00
Azrenbeth
a887107607
Add documentation ( #41 )
...
Added documentation to lib.rs and database.rs files
2021-07-30 10:06:39 +01:00
Azrenbeth
013080f712
Azren/moved to lib ( #40 )
2021-07-28 13:25:44 +01:00
Azrenbeth
31e37996ea
Split up main ( #39 )
...
Moved code from inside the main function into function calls
2021-07-27 15:31:48 +01:00
Erik Johnston
f3b1dd0b8a
Add github actions ( #33 )
2021-05-20 12:13:45 +01:00
Jörg Sommer
2fc2db2848
Update dependencies
2021-05-13 17:25:48 +02:00
Jörg Sommer
4f823fba78
Use saturating arithmetic on calculating row saving
...
The saturating arithmetic doesn't overflow, but stays at the maximum or
minimum. In this case it doesn't become negative, but zero, which
satisfies the condition below.
Closes #31
2021-05-13 17:25:37 +02:00
Erik Johnston
b33c498e99
Update dependencies
2021-03-19 18:42:48 +00:00
Erik Johnston
d2ab661b1d
Merge pull request #25 from heftig/update-deps
...
Cargo.toml: Update dependencies
2021-02-23 10:55:11 +00:00
Jan Alexander Steffens (heftig)
b07397b5e3
Cargo.toml: Update dependencies
2021-02-23 00:56:22 +01:00
Erik Johnston
4a56406fb3
Merge pull request #23 from ananace/postgres-ssl
...
Support postgres with SSL requirements
2021-02-22 14:05:16 +00:00
Alexander Olofsson
dc635bdd0e
Clean up postgres client creation slightly
2021-02-02 19:29:34 +01:00
Alexander Olofsson
9720b19332
Always use tls connector for postgres
2021-02-02 18:30:27 +01:00
Alexander Olofsson
8e691aec1f
Support postgres with SSL requirements
...
This stupidly just strips any ?sslmode= arguments from the postgres URI
and enables SSL without verification regardless of which mode the user
specifies.
2021-01-30 20:29:58 +01:00
Erik Johnston
1aac27ebb6
Merge pull request #12 from reivilibre/master
...
Add information from #2 to README about being race-safe
v0.1.0
2020-02-20 13:03:59 +00:00
Erik Johnston
be6cad0d61
Merge pull request #15 from heftig/modernize
...
Modernize the code
2020-02-20 13:02:49 +00:00
Jan Alexander Steffens (heftig)
ebbb8a01bf
Avoid having to count rows
2020-02-14 15:38:22 +01:00
Jan Alexander Steffens (heftig)
76ddeab12c
Simplify get_initial_data_from_db
...
From Jörg Sommer's PR:
https://github.com/matrix-org/rust-synapse-compress-state/pull/10
2020-02-14 15:38:22 +01:00
Jörg Sommer
c31ba2750f
main: new argument -m to give a minimal saving
...
Some compressions yield only a few hundred lines saving which isn't worth
the database update and the time needed to validate the compression. With
the new commandline argument `-m` the output would be suppressed, if not
at least the given number of database records would be saved.
2020-02-14 15:38:21 +01:00
Jörg Sommer
88fc47d819
main: add value_name() for max_state_group
...
To unify the spelling of parameters, i.e. all upper-casse, add the
`value_name()` for max_state_group.
2020-02-14 15:38:21 +01:00
Jörg Sommer
85d185fa98
Use character for split()
...
`cargo clippy` suggested to use a character instead of a string with a
single character.
See: <https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern >
2020-02-14 15:38:21 +01:00
Jörg Sommer
846ec8f898
Convert len() > 0 to ! is_empty()
...
`cargo clippy` suggested to use `is_empty()` instead of `len() > 0`,
because this doesn't require to calculate the whole length of the sequence.
See: <https://rust-lang.github.io/rust-clippy/master/index.html#len_zero >
2020-02-14 15:38:21 +01:00
Jan Alexander Steffens (heftig)
f9d3570363
Fix typo: Rename PGEscapse to PGEscape
2020-02-14 15:38:21 +01:00
Jan Alexander Steffens (heftig)
9990141d40
Ignore a warning from inside the clap macros
2020-02-14 15:38:21 +01:00
Jan Alexander Steffens (heftig)
edb5beb6dc
Regenerate Cargo.lock in the merge-friendlier format
...
Delete Cargo.lock and re-add it after a `cargo update`. Since we just
did the latter, the versions referenced do not change.
2020-02-14 15:38:15 +01:00
Jan Alexander Steffens (heftig)
39750c763e
Update deps
2020-02-14 15:36:31 +01:00
Jan Alexander Steffens (heftig)
0c8e657ec0
Switch to Rust 2018
2019-12-26 03:07:30 +01:00
Jan Alexander Steffens (heftig)
15af99fce7
Format code with rustfmt
2019-12-26 03:06:26 +01:00
Olivier Wilkinson (reivilibre)
e963977424
Add information from #2 to README about being race-safe
...
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net >
2019-10-10 20:58:46 +01:00
Richard van der Hoff
2c364b1110
Merge pull request #11 from matrix-org/rav/missing_state_groups
...
Fix infinite loop when looking for missing state groups
2019-08-12 18:34:32 +01:00
Erik Johnston
c1e422995a
Update deps
2019-08-12 17:31:37 +01:00
Richard van der Hoff
cdb734f58c
Fix infinite loop when looking for missing state groups
...
The code which handles state groups which appear in state_group_edges but not
state_groups_state would get confused if such state_groups did not themselves
have a prev_state_group.
2019-08-12 00:06:30 +01:00
Erik Johnston
71a143193c
Fix max state group option
2019-03-21 15:07:38 +00:00
Erik Johnston
8b0e9bfd70
Update dep
2019-03-21 14:44:08 +00:00
Erik Johnston
d764082d31
Add optional max_state_group param
2019-03-20 16:13:51 +00:00
Erik Johnston
b9be6c5ed1
Die if fail to write to file
2019-03-19 13:34:06 +00:00
Erik Johnston
2126625ef2
Use jemalloc
2019-03-19 13:32:29 +00:00
Erik Johnston
b7c96ee7ac
Update deps
2019-03-18 12:03:35 +00:00
Erik Johnston
7218bb0c83
Correctly escape strings
2018-11-02 16:36:08 +00:00
Erik Johnston
3b3ddc0ed0
Fix up arg names and help text
2018-10-12 16:18:50 +01:00
Erik Johnston
cd63923f6e
Use state_map crate instead of rust-matrix-lib
2018-10-12 12:11:07 +01:00
Erik Johnston
a725aba1d1
Add license headers
2018-10-05 10:43:35 +01:00
Erik Johnston
9077536320
Create LICENSE
2018-10-05 10:40:31 +01:00
Erik Johnston
fa2567a073
Add progress bar for writing output sql
2018-09-19 16:33:51 +01:00
Erik Johnston
cf25554550
Update deps to pick up perf improvement
2018-09-19 10:50:05 +01:00
Erik Johnston
b87f2beef8
Add more postgres bars
2018-09-18 18:36:17 +01:00
Erik Johnston
4c47310beb
Use string cache and update README
2018-09-18 17:51:28 +01:00
Erik Johnston
78549a76b6
Update readme
2018-09-18 15:50:10 +01:00
Erik Johnston
096467853d
Improve algorithm and documentation
2018-09-18 15:40:58 +01:00
Erik Johnston
3ba940c743
Initial commit
2018-09-11 17:44:04 +01:00