synchronized boolean tryUpdatingLogStartOffset(TopicPartition tp, long highWatermark) {
        final TopicPartitionState state = assignedStateOrNull(tp);
        if (state != null) {
            assignedState(tp).logStartOffset(highWatermark);
            return true;
        }
        return false;
    }
@Test
    public void testTryUpdatingLogStartOffset() {
        state.assignFromUser(Collections.singleton(tp0));
        final TopicPartition unassignedPartition = new TopicPartition("unassigned", 0);
        final long position = 25;
        state.seek(tp0, position);

        final long logStartOffset = 10L;
        assertTrue(state.tryUpdatingLogStartOffset(tp0, logStartOffset));
        assertEquals(position - logStartOffset, state.partitionLead(tp0));
        assertFalse(state.tryUpdatingLogStartOffset(unassignedPartition, logStartOffset));
    }