JounralingObjectStore: journal->committed_thru after replay

It's possible that the osd stopped between when the filestore
op_seq file was updated and when the journal was trimmed.  In
that case, it's possible that on boot the journal might be
full, and yet not be trimmed because commit_start assumes
there is no work to do.  Calling committed_thru on the journal
ensures that the journal matches committed_seq.

Backport: emperor dumpling
Fixes: 6756
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
JournalingObjectStore::journal_replay: don't call committed_thru

It suffices to set last_committed_seq correctly in
FileJournal::journal_replay.  This call to committed_thru can race with
the sync thread and trigger the assert(seq >= committed_seq) in
committed_thru.

Introduced in d8d27f13e11dcaefd3aa1c049b97c980283da575
Fixes: #6786
Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore::_collection_move_rename: remove source before closing guard

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedBackend: remove pushing entry for each object as it completes

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: don't move up log.tail

Moving up log.tail unnecessarily risks backfilling
a replica after a split.  Also, it disrupts the
property that replicas from the most recent interval
which performed writes must have overlapping logs.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog::rewind_divergent_log: we can rewind to tail, fix assert

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSDMonitor: add debug_fake_ec_pool

This flag will cause ReplicatedPG to act as though the
pool were actually an EC pool in that operations will
be restricted to operations which can be locally rolled
back thereby allowing us to test the ReplicatedPG local
log rollback mechanisms independent of EC.  It will also
cause ReplicatedPG to use the async read mechanism on
the PGBackend implementation once it is implemented.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: prefer older last_update for ec_pool

Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore::lfn_link: handle link within a collection

Signed-off-by: Samuel Just <sam.just@inktank.com>
common: add option to disable filestore sharded object check

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/test/osd: remove tmap test

Signed-off-by: Samuel Just <sam.just@inktank.com>
test/osd/Object: create encoders for ContDesc

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/test/osd: restructure Object/RadosModel in prep for append

Attribute handling no longer has special support in ContentsGenerator.
The most recent operation information is now stored in a special
attr rather than at the beginning of the object.  ObjectDesc layers
include their own ContentsGenerators to allow more flexibility.

Also, writes truncate to the new object size rather than simply
causing reads to stop at that object size.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/test/osd: adapt RadosModel to not do omap ops on ec_pools

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/test/osd: add append support to WriteOp

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedBackend: update the collection_list mechanisms to skip stashed objects

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGBackend: add PGTransaction

Signed-off-by: Samuel Just <sam.just@inktank.com>
hobject_t/ReplicatedPG: tempness is now an hobject thing

PGBackend implmentations will have complete control over the temp
collection.  Rather than specifying the collection when sending
ops into the PGBackend, hobjects themselves will be temp or not.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedBackend: implement RPGTransaction

RPGTransaction is essentially a wrapped ObjectStore::Transaction.
The coll_t argument is elided, tempness is instead encoded in the
hobject.  RPGTransaction tracks which temp objects are created and
cleared so we can update the ReplicatedBackend tracking and possibly
create the temp collection as needed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG/ReplicatedPG: move snap map management into append_log

Both the replica and the primary should use the same append_log
mechanism to update the snap map.

Signed-off-by: Samuel Just <sam.just@inktank.com>