Skip to content

[Feature Request] Make copy order configurable #37

@ptoews

Description

@ptoews

First of all, thank you for this great tool! It fits our use case pretty well.
There is just one thing: We would like to use this to sync databases that cannot always be connected to each other, therefore there are long periods where big amounts are collected but not immediately transferred. Connection periods are rather short and will be interrupted often (this seems to be handled already pretty well).

To prevent data fragmentation, it would be ideal that the data is therefore copied starting from the start timestamp instead of going backwards from the current point in time. Then the data on the destination db would never have any gaps.

I think this is the corresponding location in the code, and I couldn't find any already existing configurable options there:

syncflux/pkg/agent/sync.go

Lines 144 to 146 in dd51b97

//sync from newer to older data
endsec := eEpoch.Unix() - (i * chunkSecond)
startsec := eEpoch.Unix() - ((i + 1) * chunkSecond)

Thanks!

P.S: Sadly I don't have any experience in go, so a PR would be difficult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions